Skip to content
This repository was archived by the owner on Apr 10, 2018. It is now read-only.

Exception handler cannot make up its mind. #68

@Ironholds

Description

@Ironholds

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..?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions