Closed jazb83 closed 4 years ago
Could it be that dose is not calculated for that plan? Can you check to see if plan.Dose is not none?
yes, plan.Dose = none.
I was selecting the default plan for the default course. It happened that I have 1 course but a couple of plans. The default at [0] does not have a dose.
I just selected the right one and it is working now. Thank you.
In my case, planSetupsLot(3) was the good one.
for course in patient.Courses:
print('->->->->->->')
print('courseID:',course.Id)
for plan in course.PlanSetups:
print(f'Plan Id: {plan.Id}')
print(f'Dose Per Fx: {plan.PrescribedDosePerFraction}')
print(f'Number of Fx: {plan.NumberOfFractions}')
print('******************')
print('<-<-<-<-<-<-<')
->->->->->-> courseID: HN Plan Id: 0126_7fields Dose Per Fx: 180.0 cGy Number of Fx: 17
Plan Id: Plan_PTV 30.6 Dose Per Fx: 180.0 cGy Number of Fx: 17
Plan Id: Plan1 Dose Per Fx: 200.0 cGy Number of Fx: 10
Plan Id: 1 HN Dose Per Fx: 180.0 cGy Number of Fx: 17
Plan Id: 1 HN1 Dose Per Fx: 180.0 cGy Number of Fx: 17
Plan Id: 1 HN1:1 Dose Per Fx: 180.0 cGy Number of Fx: 17
<-<-<-<-<-<-<
I am trying to execute the GettingStarted.ipynb notebook: https://github.com/VarianAPIs/PyESAPI/tree/master/examples/DeveloperWorkshop2018
However, I cannot pass the following error (everything before the following point is working correctly):
"AttributeError: object has no attribute 'np_array_like' after "plan.Dose.* ".
Suggestions???