LocalSortGtOperator: local variable referenced before assignment
In nnunet-ensemble
, LocalSortGtOperator raises the following error if ran with a dataset imported as nifti files. It checks for some dicom tags and if they are not there, we see the following issue which also indicates that it is not well structured in the codebase.
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/airflow/operators/python.py", line 175, in execute
return_value = self.execute_callable()
File "/usr/local/lib/python3.9/site-packages/airflow/operators/python.py", line 192, in execute_callable
return self.python_callable(*self.op_args, **self.op_kwargs)
File "/kaapana/mounted/workflows/dags/nnunet/LocalSortGtOperator.py", line 51, in start
assert ref_series_items is not None
UnboundLocalError: local variable 'ref_series_items' referenced before assignment