When I tried to get the location for an IPV6,
database = IP2Location.IP2Location()
database.open(os.path.join("data", "IP2LOCATION-LITE-DB1.IPV6.BIN"))
rec = database.get_all('2600:1009:d01f:87d4:0:48:63ee:4601')
the following exception is thrown:
Traceback (most recent call last):
File "prueba.py", line 77, in <module>
print(str(IP2LocObj.get_all('2600:1009:d01f:87d4:0:48:63ee:4601')))
File "anaconda3/lib/python3.7/site-packages/IP2Location-8.7.1-py3.7.egg/IP2Location.py", line 315, in get_all
File "anaconda3/lib/python3.7/site-packages/IP2Location-8.7.1-py3.7.egg/IP2Location.py", line 546, in _get_record
File "anaconda3/lib/python3.7/site-packages/IP2Location-8.7.1-py3.7.egg/IP2Location.py", line 477, in _parse_addr
File "anaconda3/lib/python3.7/site-packages/IP2Location-8.7.1-py3.7.egg/IP2Location.py", line 101, in is_ipv4
ValueError: invalid literal for int() with base 10: '2600:1009:d01f:87d4:0:48:63ee:4601'
The problem is that the method _parse_addr(self, addr) always calls the method is_ipv4(addr).
When I tried to get the location for an IPV6,
the following exception is thrown:
The problem is that the method _parse_addr(self, addr) always calls the method is_ipv4(addr).