You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I stupidly tried get_all_output_file_names (by @anselm-baur ) on a WrapperTask and got error
Traceback (most recent call last):
File "run_naf_reconstruction.py", line 86, in <module>
output_files_str ="\n".join(task.get_all_output_file_names())
File "/afs/desy.de/user/m/meliache/.local/lib/python3.8/site-packages/b2luigi/core/task.py", line 174, in get_all_output_file_namesfor file_names inself._transform_output(self.output()).values():
AttributeError: 'NoneType' object has no attribute 'values'
I think it's clear that that output is not really defined for a wrapper task, though it seems that self._transform_output can deal with that and just returns None.
But from a user-experience point of view, if a task has no output, I personally would expect the function to just return an empty list in the case of missing outputs. Not sure if others would expect/prefer the same, but I would try to go with the principle of least surprise and if give an error message, give some more useful one.
The text was updated successfully, but these errors were encountered:
I stupidly tried
get_all_output_file_names
(by @anselm-baur ) on aWrapperTask
and got errorI think it's clear that that
output
is not really defined for a wrapper task, though it seems thatself._transform_output
can deal with that and just returnsNone
.But from a user-experience point of view, if a task has no output, I personally would expect the function to just return an empty list in the case of missing outputs. Not sure if others would expect/prefer the same, but I would try to go with the principle of least surprise and if give an error message, give some more useful one.
The text was updated successfully, but these errors were encountered: