Skip to content

Handling exceptions and errors#226

Open
givelberg wants to merge 2 commits into
mainfrom
bugfix/errorhandle
Open

Handling exceptions and errors#226
givelberg wants to merge 2 commits into
mainfrom
bugfix/errorhandle

Conversation

@givelberg
Copy link
Copy Markdown
Contributor

Adding several checks and error handling to bufr to ioda converters.
Added capturing exception to marine bufr prepobs task.

Comment thread utils/b2i/b2iconverter/bufr2ioda_converter.py Outdated
Comment thread utils/b2i/b2iconverter/bufr2ioda_converter.py
@HyundeokChoi-NOAA
Copy link
Copy Markdown
Contributor

It still has the same issue. See line 723 in the log file below.
/lfs/h2/emc/da/noscrub/Hyundeok.Choi/obsForge_realtime/COMROOT/obsforge/logs/2026052106/gfs_marine_bufr_dump_prep.log

@givelberg
Copy link
Copy Markdown
Contributor Author

Hyundeok,
I think you have the code without the correct patch that I made.

in the log file
/lfs/h2/emc/da/noscrub/Hyundeok.Choi/obsForge_realtime/COMROOT/obsforge/logs/2026052106/gfs_marine_bufr_dump_prep.log

the crash points to
/lfs/h2/emc/da/noscrub/Hyundeok.Choi/obsForge_realtime/ush/python/pyobsforge/task/marine_bufr_prepobs.py

where it has
204 try:
205 logger.debug(f"Executing {concater}")
206 concater()
207 # catch everything:
208 except Exception as e:
209 if type(e).name in ('KeyboardInterrupt', 'SystemExit'):
210 raise
211

But in my code there is BaseException instead of Exception.
This is supposed to capture everything.

It still has the same issue. See line 723 in the log file below. /lfs/h2/emc/da/noscrub/Hyundeok.Choi/obsForge_realtime/COMROOT/obsforge/logs/2026052106/gfs_marine_bufr_dump_prep.log

@HyundeokChoi-NOAA
Copy link
Copy Markdown
Contributor

I did make changes in the ush/python/pyobsforge/task/marine_bufr_prepobs.py.

image

Did I miss something else?

@givelberg
Copy link
Copy Markdown
Contributor Author

givelberg commented May 21, 2026

I did make changes in the ush/python/pyobsforge/task/marine_bufr_prepobs.py.

image Did I miss something else?

Just look at what you posted:

# catch everything
except Exception as e:

but it should be

# catch everything
except BaseException as e:

I am not sure how this came about.
The code in the branch has BaseException.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants