dballe
dballe copied to clipboard
skip wrong bufr from importer in python
Importing bufr from file with code like this:
with importer.from_file(file) as f:
for dballemessage in f:
I get:
2025-01-07 21:50:10 - root - ERROR - Exception occured: (memory):0+30: section 3 (Data desription section) claims to end past the end of the BUFR message
2025-01-07 21:50:10 - root - ERROR - Traceback (most recent call last):
File "/usr/bin/amqp2dballed", line 162, in run
for dballemessage in f:
ValueError: (memory):0+30: section 3 (Data desription section) claims to end past the end of the BUFR message
Yes, I can catch error but there is any possibility to skip the wrong bufr and continue with the others ?