GeoIPError: Invalid database type; record_* methods expect City database
vmihailenco opened this issue · 7 comments
I have following warning when I try to use latest city database:
env/src/pygeoip/pygeoip/__init__.py:128: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
if delim == six.u(chr(255) * 3):
and when I try to execute:
record = geo_ip.record_by_addr('24.24.24.24')
I get following exception:
GeoIPError: Invalid database type; record_* methods expect City database
But with following code:
if delim == chr(255) * 3:
record_by_addr() works as expected.
I can reproduce in 0.2.4
Fixed in master
Would love to see the package in PIP upgraded to v0.2.5, as this bug is giving me grief in 0.2.4 and manually fixing it is lame.
I second this, would love to see the PIP package with this fix!
jontsai
On Sun, Oct 14, 2012 at 8:37 PM, Luke Anderson notifications@github.comwrote:
Would love to see the package in PIP upgraded to v0.2.5, as this bug is
giving me grief in 0.2.4 and manually fixing it is lame.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-9433085.
I don't have privileges to update pip, so I forward this and ping @jennifere.
I will put 0.2.5 into PyPI tonight.