Miserlou / django-easy-timezones

Easy timezones for Django based on GeoIP
http://gun.io/blog/django-easy-timezones/
Apache License 2.0
203 stars 44 forks source link

Invalid database type, expected City #2

Closed craiglabenz closed 10 years ago

craiglabenz commented 10 years ago

Followed your instructions and am getting this error out of the gate:

Internal Server Error: /
Traceback (most recent call last):
  File "/Users/Craig/Sites/dfw/.dfw/lib/python2.7/site-packages/django/core/handlers/base.py", line 90, in get_response
    response = middleware_method(request)
  File "/Users/Craig/Sites/dfw/.dfw/lib/python2.7/site-packages/easy_timezones/middleware.py", line 37, in process_request
    tz = db.time_zone_by_addr(ip)
  File "/Users/Craig/Sites/dfw/.dfw/lib/python2.7/site-packages/pygeoip/__init__.py", line 628, in time_zone_by_addr
    raise GeoIPError(message)
GeoIPError: Invalid database type, expected City

At the moment of the error, my _database_type = 1 and const.CITY_EDITIONS = (6, 2, 30)

Thanks!

Miserlou commented 10 years ago

Ah, I think the appropriate file has moved. I'll just attach a known working file directly, one second.

Miserlou commented 10 years ago

Can you try with the GeoIP.dat file included in the repo now?

craiglabenz commented 10 years ago

Incredible responsiveness! Thanks, and yes that works.

The previously linked-to file was 607K, and the new one is ~17MB