Mouse-Imaging-Centre / pydpiper

Python code for flexible pipeline control
Other
24 stars 10 forks source link

If CmdStage.output ==0, CmdStage.log_file will be None #368

Closed nzxwang closed 6 years ago

nzxwang commented 6 years ago

Ref: https://github.com/Mouse-Imaging-Centre/pydpiper/blob/master/pydpiper/core/stages.py#L41

If CmdStage.output==0, this will later lead to a TypeError:

File "/micehome/nwang/repos/MICe-lab/python/tissvis/tissue_vision.py", line 78, in <module>
    tissue_vision_application()
  File "/micehome/nwang/repos/pydpiper/pydpiper/execution/application.py", line 196, in f
    execute(pipeline(options).stages, options)
  File "/micehome/nwang/repos/pydpiper/pydpiper/execution/application.py", line 146, in execute
    ensure_short_output_paths(stages)  # TODO convert to new `CmdStage`s
  File "/micehome/nwang/repos/pydpiper/pydpiper/execution/application.py", line 69, in ensure_short_output_paths
    for o in [o.filename_wo_ext for o in s.outputs] + [os.path.basename(s.log_file)]:
  File "/axiom2/projects/software/arch/linux-xenial-xerus/python/3.6.4/lib/python3.6/posixpath.py", line 144, in basename
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
bcdarwin commented 6 years ago

Doesn't seem like a bug to me.