Comments (4)
When trying to convert MRT file <updates.20030201.0023.bz2> I get the following error:
[
Traceback (most recent call last):
File "mrt2json.py", line 16, in
main()
File "mrt2json.py", line 8, in main
for entry in Reader(sys.argv[1]):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mrtparse/init.py", line 86, in next
self.unpack_hdr(mrt)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mrtparse/init.py", line 116, in unpack_hdr
mrt.unpack()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mrtparse/init.py", line 229, in unpack
MRT_ST[self.data['type'][0]][self.data['subtype'][0]]
KeyError: 22864
File can be downloaded from:
http://archive.routeviews.org/bgpdata/2003.02/UPDATES/updates.20030201.0023.bz2
from mrtparse.
Hi,
Thank you for using mrtparse ❗
In my environment, there were no errors.
Could you tell me which version you are using ❓
$ python3 -c "import mrtparse; print(mrtparse.__version__)"
2.1.0
$ mrt2json.py updates.20030201.0023.bz2
[
{
"timestamp": {
"1044087837": "2003-02-01 17:23:57"
},
"type": {
"16": "BGP4MP"
},
"subtype": {
"1": "BGP4MP_MESSAGE"
(...snip)
],
"nlri": [
{
"prefix_length": 24,
"prefix": "203.196.244.0"
}
]
}
}
]
from mrtparse.
I am running mrtparse 2.0.1 in python 3.10.2 and macOS 12.2.1
from mrtparse.
I changed the version and tried it, but there was no problem...
$ python -c 'import mrtparse; print(mrtparse.__version__)'
2.0.1
$ ./mrt2json.py updates.20030201.0023.bz2
[
{
"timestamp": [
1044087837,
"2003-02-01 17:23:57"
],
"type": [
16,
"BGP4MP"
],
(...snip)
],
"nlri": [
{
"prefix_length": 24,
"prefix": "203.196.244.0"
}
]
}
}
]
Your download data might be broken, so could you check the checksum ❓
In my environment, the checksum is as follows:
$ md5sum updates.20030201.0023.bz2
2e15294482ff06f580fc4d6c218a3128 updates.20030201.0023.bz2
from mrtparse.
Related Issues (20)
- Replace `val_dict` by a better solution HOT 3
- Extended NLRI Encodings HOT 4
- Upload to pypi HOT 3
- potential bug: mrt2exabgp.py with BGP4MP_MESSAGE HOT 4
- Enhancement: mrt2exabgp.py (-A|-G) should finish by itself HOT 5
- ExaBGP API grouping format syntax change HOT 6
- mrt2exabgp bails out with CRC error HOT 3
- mrt2bgpdump.py crashes with Updates messages HOT 3
- module 'signal' has no attribute 'SIGPIPE' on jupyter notebook , python 3.6 on windows HOT 3
- TypeError: object of type 'NoneType' has no len() in a Route Views update file HOT 5
- MRTPARSE to exabgp config hangs when using -G & -P flags HOT 1
- IPv4 addresses decoded as IPv6 in print_all.py HOT 3
- Bug in __init__.py line 930 HOT 2
- Error parsing RIPE MRT data HOT 2
- Python3 Error in mrtparse HOT 9
- Convert the RAW BGP data from RIPE HOT 9
- Error in Example mrt2bgpdump HOT 1
- mrt2exabgp mrt2bgpdump key issue for prefix length HOT 4
- AttributeError: 'Reader' object has no attribute 'mrt'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mrtparse.