rucarrol / PeerFinder

Tool to find common points between ASNs on PeeringDB
MIT License
59 stars 16 forks source link

Traceback #19

Open Acalanum opened 5 months ago

Acalanum commented 5 months ago

Getting this when trying to run peerfinder today. Has worked in the past for me.

Traceback (most recent call last): File "/home/user/.local/bin/peerfinder", line 8, in sys.exit(main()) File "/home/user/.local/lib/python3.8/site-packages/peerfinder/peerfinder.py", line 84, in main ix_set = [pdb_toixp(ix) for , ix in ix_dedup.items()] File "/home/user/.local/lib/python3.8/site-packages/peerfinder/peerfinder.py", line 84, in ix_set = [pdb_toixp(ix) for , ix in ix_dedup.items()] File "/home/user/.local/lib/python3.8/site-packages/peerfinder/peerfinder.py", line 105, in pdb_to_ixp subnet4=[IPv4Address(i) for i in netixlan_set["ipaddr4"]], File "/home/user/.local/lib/python3.8/site-packages/peerfinder/peerfinder.py", line 105, in subnet4=[IPv4Address(i) for i in netixlan_set["ipaddr4"]], File "/usr/lib/python3.8/ipaddress.py", line 1257, in init self._ip = self._ip_int_from_string(addr_str) File "/usr/lib/python3.8/ipaddress.py", line 1144, in _ip_int_from_string raise AddressValueError("Expected 4 octets in %r" % ip_str) ipaddress.AddressValueError: Expected 4 octets in 'None'

Acalanum commented 3 months ago

Example with inputs:

$ peerfinder --asn 6939 20940 --ix Fetching PeeringDB info for 6939,20940 Traceback (most recent call last): File "/home/user/.local/bin/peerfinder", line 8, in sys.exit(main()) File "/home/user/.local/lib/python3.8/site-packages/peerfinder/peerfinder.py", line 84, in main ix_set = [pdb_toixp(ix) for , ix in ix_dedup.items()] File "/home/user/.local/lib/python3.8/site-packages/peerfinder/peerfinder.py", line 84, in ix_set = [pdb_toixp(ix) for , ix in ix_dedup.items()] File "/home/user/.local/lib/python3.8/site-packages/peerfinder/peerfinder.py", line 105, in pdb_to_ixp subnet4=[IPv4Address(i) for i in netixlan_set["ipaddr4"]], File "/home/user/.local/lib/python3.8/site-packages/peerfinder/peerfinder.py", line 105, in subnet4=[IPv4Address(i) for i in netixlan_set["ipaddr4"]], File "/usr/lib/python3.8/ipaddress.py", line 1257, in init self._ip = self._ip_int_from_string(addr_str) File "/usr/lib/python3.8/ipaddress.py", line 1144, in _ip_int_from_string raise AddressValueError("Expected 4 octets in %r" % ip_str) ipaddress.AddressValueError: Expected 4 octets in 'None'

Does work for other ASN combos though...

$ peerfinder --asn 6939 16509 --ix Fetching PeeringDB info for 6939,16509 +-----------------------------------------------------+--------------------------------------+-------------------------------------+ | IX | Hurricane Electric | Amazon.com | +-----------------------------------------------------+--------------------------------------+-------------------------------------+ | 1-IX EU | v4: 185.1.254.62 | v4: 185.1.254.91 | | | v6: 2001:7f8:115:1::62 | v6: 2001:7f8:115:1::91 | +-----------------------------------------------------+--------------------------------------+-------------------------------------+ | AKL-IX (Auckland NZ): AKL-IX | v4: 43.243.21.17 | v4: 43.243.21.113 | | | v6: 2001:7fa:11:6:0:1b1b:0:1 | v6: 2001:7fa:11:6:0:407d:0:2 | +-----------------------------------------------------+--------------------------------------+-------------------------------------+ | AMS-IX | v4: 80.249.209.150 | v4: 80.249.210.100 | | | v6: 2001:7f8:1::a500:6939:1 | 80.249.210.217 | | | | v6: 2001:7f8:1::a501:6509:1 | | | | 2001:7f8:1::a501:6509:2 | +-----------------------------------------------------+--------------------------------------+-------------------------------------+