Call Issues with Plan Generator

12 views
Skip to first unread message

Oscar

unread,
Mar 2, 2026, 5:49:02 PM (12 days ago) Mar 2
to Pylinac
Hi all,

When calling the plan generator function I get the following error:
TypeError: Can't instantiate abstract class PlanGenerator without an implementation for abstract method '_validate_machine_type'

I have tried this in both Spyder and using the Google Collab, screenshots have been attached below.
Spyder.PNG
Google Collab.PNG
If anyone could advise on how to resolve this that would be greatly appreciated.

Thanks

tbe...@gmail.com

unread,
Mar 3, 2026, 2:52:48 AM (12 days ago) Mar 3
to Pylinac
Hi,

I think you have to either TrueBeamPlanGenerator or HalcyonPlanGenerator instead of the generic PlanGenerator or implement the _validate_machine_type() method using your own class with the PlanGenerator class as base class.

regards
Thomas

Oscar

unread,
Mar 3, 2026, 2:20:26 PM (11 days ago) Mar 3
to Pylinac
Thanks for that fast reply, TB plan generator has worked out for me!

Kind regards,
Oscar
Reply all
Reply to author
Forward
0 new messages