- Notifications
You must be signed in to change notification settings - Fork 109
Exception handler cannot make up its mind. #68
Description
Using the netspeeds database (specifically "Binary format for APIs with Cellular") we get:
test.netspeed_by_addr("2600:1006:b025:fad7:b945:d20a:9451:85d")Traceback (most recent call last):
File "", line 1, in
File "/home/ironholds/.local/lib/python2.7/site-packages/pygeoip-0.3.1-py2.7.egg/pygeoip/init.py", line 456, in netspeed_by_addr
return const.NETSPEED_NAMES[self.id_by_addr(addr)]
File "/home/ironholds/.local/lib/python2.7/site-packages/pygeoip-0.3.1-py2.7.egg/pygeoip/init.py", line 415, in id_by_addr
raise GeoIPError('Invalid database type; expected IPv4 address')
pygeoip.GeoIPError: Invalid database type; expected IPv4 address
test.netspeed_by_addr("203.0.113.30")
Traceback (most recent call last):
File "", line 1, in
File "/home/ironholds/.local/lib/python2.7/site-packages/pygeoip-0.3.1-py2.7.egg/pygeoip/init.py", line 456, in netspeed_by_addr
return const.NETSPEED_NAMES[self.id_by_addr(addr)]
File "/home/ironholds/.local/lib/python2.7/site-packages/pygeoip-0.3.1-py2.7.egg/pygeoip/init.py", line 413, in id_by_addr
raise GeoIPError('Invalid database type; expected IPv6 address')
pygeoip.GeoIPError: Invalid database type; expected IPv6 address
...so it wants IPv4 except when you provide one. Is this expected behaviour/an unsupporteddataset,or..?