hadiasghari / pyasn

Python IP address to Autonomous System Number lookup module. (Supports fast local lookups, and historical lookups using archived BGP dumps.)
Other
275 stars 71 forks source link

Cannot parse RIPE RIS bview data anymore #62

Closed ghost closed 3 years ago

ghost commented 4 years ago

It seems that today's data of http://data.ris.ripe.net/rrc12/latest-bview.gz (permalink http://data.ris.ripe.net/rrc12/2019.10/bview.20191003.0000.gz) can't be parsed anymore. It worked at least until yesterday

> pyasn_util_convert.py --single bview.20191003.0000.gz ipasn.dat
Parsing MRT/RIB archive ..  MrtTD2Record (PEER-INDEX-TABLE, collector 1347535000, 102 peers)
  MRT record 100000 @6s
  MRT record 200000 @10s
  MRT record 300000 @13s
  MRT record 400000 @16s
  MRT record 500000 @19s
  MRT record 600000 @22s
  Exception parsing prefix record 185.206.208.42/32
Traceback (most recent call last):
  File "/usr/bin/pyasn_util_convert.py", line 71, in <module>
    skip_record_on_error=args.skip_on_error)
  File "/usr/lib64/python3.6/site-packages/pyasn/mrtx.py", line 106, in parse_mrt_file
    origin = mrt.get_first_origin_as()
  File "/usr/lib64/python3.6/site-packages/pyasn/mrtx.py", line 311, in get_first_origin_as
    return path.get_origin_as()
  File "/usr/lib64/python3.6/site-packages/pyasn/mrtx.py", line 578, in get_origin_as
    assert origin  # eventually, should not be 0 (no asn 0), or None, or an empty set
AssertionError
hadiasghari commented 4 years ago

Hi @wagner-certat, I am not actively working on pyasn at the moment to assist with the debugging. But sometimes the problem is in just one particular RIS file. Have you since tried with a later day?

marcolussetti commented 4 years ago

Confirming the issue, tried with today with the same result. Tried going back to http://data.ris.ripe.net/rrc12/2019.10/bview.20191002.0000.gz and it does work.

Might try to work on it tomorrow if I can find the time though first time using this package.

hadiasghari commented 4 years ago

@marcolussetti I will flag this as an incidental problem with that particular file and close it for now. Thanks,

ghost commented 4 years ago

Does it mean that RIPE RIS data is not supported (anymore)? The error (message) is the same for the current files from that source.

hadiasghari commented 4 years ago

@wagner-certat sorry, I misunderstood, then I'll repoen it.

marty90 commented 4 years ago

+1

marty90 commented 4 years ago

--skip-on-error does not work

marty90 commented 4 years ago

Apparently originating from here

ghost commented 4 years ago

The problem has been fixed by efcd5ef -> can we have a new release plz :)

hadiasghari commented 4 years ago

Hi @wagner-certat , do you mean it's already fixed in main and we just need a new Pypi release?

ghost commented 4 years ago

Exactly :)

hadiasghari commented 4 years ago

Ok thanks for pointing that out. I'll do it in the next few days. I might ask for your help/feedback afterwards to make sure nothing breaks with the release.

ghost commented 4 years ago

I'm using the master branch in our production system since a few days now 0 to fix that error, I haven't seen any issues yet.

hadiasghari commented 3 years ago

Dear @wagner-certat, I have released a new pypi version. Can you kindly check and tell me if it works as expected? Thanks.

ghost commented 3 years ago

Yes, works!

Thank you