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
idxdescriptor, = 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
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 idxdescriptor, = 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