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

error scanning bufr with only constant station data #226

Closed
pat1 opened this issue May 20, 2020 · 4 comments
Closed

error scanning bufr with only constant station data #226

pat1 opened this issue May 20, 2020 · 4 comments
Assignees

Comments

@pat1
Copy link

pat1 commented May 20, 2020

I do not know if is possible to arkive such type of bufr but before python scanner I do not receive error
rotto.zip

dbamsg dump /tmp/rotto.bufr
#0 BUFR message: 112 bytes, origin 200:0, category 0 255:255:0, bufr edition 4, tables 14:1, subsets 1, values: 5/11:
Subset 0:
001194 Report mnemonic(CCITTIA5): mobile
004001 YEAR(YEAR): (undef)
004002 MONTH(MONTH): (undef)
004003 DAY(DAY): (undef)
004004 HOUR(HOUR): (undef)
004005 MINUTE(MINUTE): (undef)
004006 SECOND(SECOND): (undef)
001011 SHIP OR MOBILE LAND STATION IDENTIFIER(CCITTIA5): pat1
001213 AIRBASE AIR QUALITY OBSERVING STATION CODE(CCITTIA5): error01
005001 LATITUDE (HIGH ACCURACY)(DEGREE): 44.48913
006001 LONGITUDE (HIGH ACCURACY)(DEGREE): 11.37000
cat  /tmp/rotto.bufr | arki-query --stdin=bufr  --yaml ""
ERROR scanner function failed
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/arkimet/scan/bufr.py", line 30, in scan
    if scan(msg, md) is False:
  File "/etc/arkimet/scan/bufr_generic.py", line 57, in scan
    md["timerange"] = read_timerange(msg)
  File "/etc/arkimet/scan/bufr_generic.py", line 7, in read_timerange
    p1_list = {d["trange"].p1 for d in msg.query_data()}
  File "/etc/arkimet/scan/bufr_generic.py", line 7, in <setcomp>
    p1_list = {d["trange"].p1 for d in msg.query_data()}
RuntimeError: cannot access values on a cursor before or after iteration
Source: INLINE(bufr,112)
Origin: BUFR(200, 000)
Product: BUFR(255, 255, 000, t=mobile)
Area: GRIB(type=mob, x=11, y=44)
Proddef: GRIB(id=pat1)
cat  /tmp/rotto.bufr | arki-query --stdin=bufr --inline ""| arki-xargs -n 1 |dbamsg dump
<nulla>
@edigiacomo
Copy link
Member

The scanner should work with BUFR without data: when the list of timeranges is empty, it considers the message as an observation, i.e. p1 = 0s (see https://github.com/ARPA-SIMC/arkimet/blob/v1.25-1/conf/scan/bufr_generic.py#L13).

The error is raised by dballe, I have opened an issue ARPA-SIMC/dballe#213

@spanezz
Copy link
Contributor

spanezz commented Aug 10, 2020

ARPA-SIMC/dballe#213 should now be fixed

@edigiacomo
Copy link
Member

ARPA-SIMC/dballe#213 is fixed in dballe v8.12-1, now available on simc/stable Copr repository. @pat1 please check and close this issue if the problem is solved.

@edigiacomo edigiacomo assigned pat1 and unassigned edigiacomo and spanezz Aug 10, 2020
@edigiacomo edigiacomo added review and removed bug labels Aug 10, 2020
@edigiacomo
Copy link
Member

Questa issue è stata chiusa per inattività. Nel caso in cui sia un argomento ancora rilevante, si prega di riaprirla con una motivazione che tenga conto delle modifiche applicate nel corso degli anni al progetto.

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

No branches or pull requests

3 participants