dessn / Pippin

Pipeline for photometric SN analysis
MIT License
9 stars 10 forks source link

pippin.sh -c always fails (on last line) #108

Closed benjaminrose closed 2 years ago

benjaminrose commented 2 years ago

When running pippin.sh -c L261 (see below) creates an error (also see below).

https://github.com/dessn/Pippin/blob/4dbfd29d696cc4819fafc865645cdcb723b6c0d6/run.py#L260-L262

Traceback (most recent call last):
  File "/project2/rkessler/PRODUCTS/pippin/run.py", line 262, in <module>
    raise(ValueError(f"{manager.num_errs} Errors found"))

It looks like manager.num_errs can sometimes be assigned as None. https://github.com/dessn/Pippin/blob/4dbfd29d696cc4819fafc865645cdcb723b6c0d6/run.py#L181-L182 It might be a bit too fancy, but I think you can just change L182 to manager.num_errs = num_errs or 0 and create a default number for manager.num_errs if num_errs is None.