Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to process NCEP BUFR files - exits with StopIteration #30

Open
Plantain opened this issue Aug 18, 2023 · 0 comments
Open

Unable to process NCEP BUFR files - exits with StopIteration #30

Plantain opened this issue Aug 18, 2023 · 0 comments

Comments

@Plantain
Copy link

Something is throwing an exception deep inside pybufrkit while processing NCEP bufr files and I'm not able to figure out where it's coming from.

Data file:
http://static.skysight.io/ncep.bufr.gz

Versions:
% pybufrkit --version
pybufrkit: 0.2.20

% python --version
Python 3.10.6

Output:
% pybufrkit decode --continue-on-error -m /tmp/ncep.bufr > out.txt
Traceback (most recent call last):
File "/Users/plantain/.pyenv/versions/3.10.6/lib/python3.10/site-packages/pybufrkit/decoder.py", line 422, in generate_bufr_message
bufr_message = decoder.process(
File "/Users/plantain/.pyenv/versions/3.10.6/lib/python3.10/site-packages/pybufrkit/decoder.py", line 98, in process
nbits_decoded += self.process_section(bufr_message, bit_reader, section)
File "/Users/plantain/.pyenv/versions/3.10.6/lib/python3.10/site-packages/pybufrkit/decoder.py", line 125, in process_section
parameter.value = self.process_template_data(bufr_message, bit_reader)
File "/Users/plantain/.pyenv/versions/3.10.6/lib/python3.10/site-packages/pybufrkit/decoder.py", line 203, in process_template_data
template_processing_func(state, bit_reader, template_to_process)
File "/Users/plantain/.pyenv/versions/3.10.6/lib/python3.10/site-packages/pybufrkit/templatecompiler.py", line 327, in process_compiled_template
process_statements(coder, state, bit_operator, compiled_template.statements)
File "/Users/plantain/.pyenv/versions/3.10.6/lib/python3.10/site-packages/pybufrkit/templatecompiler.py", line 367, in process_statements
process_statements(coder, state, bit_operator, statement.statements)
File "/Users/plantain/.pyenv/versions/3.10.6/lib/python3.10/site-packages/pybufrkit/templatecompiler.py", line 344, in process_statements
getattr(state, statement.method_name)(*statement.args)
File "/Users/plantain/.pyenv/versions/3.10.6/lib/python3.10/site-packages/pybufrkit/coder.py", line 184, in add_bitmap_link
idx_descriptor, _ = self.next_bitmapped_descriptor()
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/plantain/.pyenv/versions/3.10.6/bin/pybufrkit", line 8, in
sys.exit(main())
File "/Users/plantain/.pyenv/versions/3.10.6/lib/python3.10/site-packages/pybufrkit/init.py", line 274, in main
command_decode(ns)
File "/Users/plantain/.pyenv/versions/3.10.6/lib/python3.10/site-packages/pybufrkit/commands.py", line 62, in command_decode
for bufr_message in generate_bufr_message(decoder, s,
RuntimeError: generator raised StopIteration

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

No branches or pull requests

1 participant