4👍
✅
This module is Deprecated since version 1.9 in favor of django.contrib.gis.geoip2
, which supports IPv6 and the GeoLite2 database format.
If you have a django < 1.9, use instead
from django.contrib.gis.geoip import GeoIP
7👍
I fixed by installing it through pip package geoip2==2.9.0
pip install geoip2==2.9.0
- [Django]-Django celery: Import error – no module named task
- [Django]-NameError: name 'RegexValidator' is not defined
- [Django]-How to add russian language support to Django CMS?
1👍
Double check your GEOIP_PATH
. And my I remind you that Windows requires back slashes not forward slashes.
1👍
I was also facing the same error and couldn’t resolve it after multiple attempts.
Since it was working on one of my system, I found one difference, When you install geoip2 via pip it also installs maxminddb. The system on which it was working, maxminddb version was 1.5.4 and the one on which it was not working it was maxminddb==2.0.0
so finally I did
pip install maxminddb==1.5.4
and it worked
- [Django]-Can this variable really be "referenced before assignment"
- [Django]-Celery Beat sending tasks on startup (before the scheduled time)
- [Django]-How to implement password change form in Django 1.9
- [Django]-Django-storages S3Boto3Storage makes HEAD and GET requests on read
Source:stackexchange.com