desihub / desispec

DESI spectral pipeline
BSD 3-Clause "New" or "Revised" License
36 stars 24 forks source link

Make dashboard more robust to comments #2135

Open akremin opened 1 year ago

akremin commented 1 year ago

There was an error in the dashboard today when a single "/" is added in an exposure_table comment:

    elif chars[0]!='0' and int(chars[0])<int(chars[1]):
ValueError: invalid literal for int() with base 10: 'spectrograph problem'

This can be easily mitigated by better element checking before the "if" statements here: https://github.com/desihub/desispec/blob/64a9b9d93a75bab64ebf9d2745f19cfdbaddfe5e/py/desispec/workflow/proc_dashboard_funcs.py#L607