NOAA-GFDL/MDTF-diagnostics

POD settings.jsonc parsing fails silently

Closed this issue · 0 comments

If there is an error in a POD settings.jsonc file, the framework dies with a rather unintuitive error messge:

  File "MDTF-diagnostics/src/diagnostic.py", line 493, in from_config
    return cls.from_struct(pod_name, config.pod_data[pod_name])
KeyError: 'some_failed_pod'

If the parsing for a particular POD fails, the POD is appended to a bad_pods list but no warning is given. This makes troubleshooting difficult

for p in pod_list:
try:
d = _load_one_json(p)
assert d
except Exception as exc:
bad_pods.append(p)
continue

@wrongkindofdoctor, @tsjackson-noaa -- any thoughts on this?