[Bug 378793] Re: SystemError when looking for some unknown IP addresses
Scott Kitterman
ubuntu at kitterman.com
Wed Nov 23 14:13:20 UTC 2016
This is fixed in all supported releases.
** Changed in: python-geoip (Ubuntu)
Status: New => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-geoip in Ubuntu.
https://bugs.launchpad.net/bugs/378793
Title:
SystemError when looking for some unknown IP addresses
Status in python-geoip package in Ubuntu:
Fix Released
Bug description:
Binary package hint: python-geoip
When trying to locate any of these (and more) IP addresses:
188.129.154.21
99.56.83.65
24.49.164.246
24.49.162.115
173.45.97.18
99.56.26.183
The library returns this exception:
Traceback (most recent call last):
File "tester.py", line 16, in <module>
locator.record_by_addr('99.56.26.183')
SystemError: error return without exception set
Which is hardly an intended behavior and instead a bug. The problem is
not there with the latest 1.2.4 version of this library (or at least
the current source version not packaged in ubuntu).
Note that the IP addresses are not a problem per-se, it's just the the
library should return None if it can't locate the address instead of
raising that SystemError. If you use a different version of the
GeoIPLite database you probably will have different IP addresses that
raise this problem.
Running this small script recreates the problem for me:
import sys
import GeoIP as geoip
location_file = sys.argv[1]
locator = geoip.open(location_file,
geoip.GEOIP_MEMORY_CACHE)
ips = ['188.129.154.21',
'99.56.83.65',
'24.49.164.246',
'24.49.162.115',
'173.45.97.18',
'99.56.26.183']
for ip in ips:
locator.record_by_addr(ip)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-geoip/+bug/378793/+subscriptions
More information about the foundations-bugs
mailing list