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

dballe.Message.query_data() error when the BUFR has only station data #213

Closed
edigiacomo opened this issue May 20, 2020 · 0 comments
Closed
Assignees
Labels

Comments

@edigiacomo
Copy link
Member

In [4]: import dballe

In [5]: importer = dballe.Importer("BUFR") 
   ...: with importer.from_file("tmp/rotto.bufr") as f: 
   ...:     for msgs in f: 
   ...:         for msg in msgs: 
   ...:             for d in msg.query_data(): 
   ...:                 print(d["trange"]) 
   ...:                                                                                                                                                                                                                                       
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-5-432d121cea6f> in <module>
      4         for msg in msgs:
      5             for d in msg.query_data():
----> 6                 print(d["trange"])
      7 

RuntimeError: cannot access values on a cursor before or after iteration

Test file: rotto.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants