diff --git a/l2json/sources/generators.py b/l2json/sources/generators.py index 278a88a32b4aa467a2a16800bb53ee638fc828b7..d580bad9ebbd2dfe04ea2c16c39d4f466a66b1b1 100644 --- a/l2json/sources/generators.py +++ b/l2json/sources/generators.py @@ -106,6 +106,9 @@ def yield_l2obs_from_params( continue # filtered_metadata, filtered_data = metadata, data - l2obs = parse_json.build_lofar2_observation(filtered_metadata, filtered_data) + try: + l2obs = parse_json.build_lofar2_observation(filtered_metadata, filtered_data) - yield (station, field, datatype, obs_id), l2obs + yield (station, field, datatype, obs_id), l2obs + except Exception as e: + print(f"Skipping {obs_id=} for {station}{field} due to {e=}")