[Django] #33933: Cannot use GeoIP2 without setting up gdal anymore

71 views
Skip to first unread message

Django

unread,
Aug 17, 2022, 8:18:10 AM8/17/22
to django-...@googlegroups.com
#33933: Cannot use GeoIP2 without setting up gdal anymore
-----------------------------------------+------------------------
Reporter: Florent Messa | Owner: nobody
Type: Uncategorized | Status: new
Component: GIS | Version: 4.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
Hi,

Since 4.1, we cannot use GeoIP2 component without setting up gdal first
because of the import of `Point`.

The traceback:

{{{
File "/Users/thoas/Sites/python/kolkt/.env/lib/python3.10/site-
packages/django/contrib/gis/geoip2/__init__.py", line 21, in <module>
from .base import GeoIP2, GeoIP2Exception
File "/Users/thoas/Sites/python/kolkt/.env/lib/python3.10/site-
packages/django/contrib/gis/geoip2/base.py", line 6, in <module>
from django.contrib.gis.geos import Point
File "/Users/thoas/Sites/python/kolkt/.env/lib/python3.10/site-
packages/django/contrib/gis/geos/__init__.py", line 5, in <module>
from .collections import ( # NOQA
File "/Users/thoas/Sites/python/kolkt/.env/lib/python3.10/site-
packages/django/contrib/gis/geos/collections.py", line 6, in <module>
from django.contrib.gis.geos.geometry import GEOSGeometry,
LinearGeometryMixin
File "/Users/thoas/Sites/python/kolkt/.env/lib/python3.10/site-
packages/django/contrib/gis/geos/geometry.py", line 8, in <module>
from django.contrib.gis import gdal
File "/Users/thoas/Sites/python/kolkt/.env/lib/python3.10/site-
packages/django/contrib/gis/gdal/__init__.py", line 28, in <module>
from django.contrib.gis.gdal.datasource import DataSource
File "/Users/thoas/Sites/python/kolkt/.env/lib/python3.10/site-
packages/django/contrib/gis/gdal/datasource.py", line 40, in <module>
from django.contrib.gis.gdal.driver import Driver
File "/Users/thoas/Sites/python/kolkt/.env/lib/python3.10/site-
packages/django/contrib/gis/gdal/driver.py", line 5, in <module>
from django.contrib.gis.gdal.prototypes import ds as vcapi
File "/Users/thoas/Sites/python/kolkt/.env/lib/python3.10/site-
packages/django/contrib/gis/gdal/prototypes/ds.py", line 9, in <module>
from django.contrib.gis.gdal.libgdal import lgdal
File "/Users/thoas/Sites/python/kolkt/.env/lib/python3.10/site-
packages/django/contrib/gis/gdal/libgdal.py", line 60, in <module>
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Could not find the GDAL
library (tried "gdal", "GDAL", "gdal3.4.0", "gdal3.3.0", "gdal3.2.0",
"gdal3.1.0", "gdal3.0.0", "gdal2.4.0", "gdal2.3.0", "gdal2.2.0"). Is GDAL
installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.
}}}

Is it on purpose or a regression?

Thank you

--
Ticket URL: <https://code.djangoproject.com/ticket/33933>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 17, 2022, 8:18:22 AM8/17/22
to django-...@googlegroups.com
#33933: Cannot use GeoIP2 without setting up gdal anymore
-------------------------------+--------------------------------------

Reporter: Florent Messa | Owner: nobody
Type: Uncategorized | Status: new
Component: GIS | Version: 4.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Description changed by Florent Messa:

Old description:

New description:

The traceback:

Thank you

--

--
Ticket URL: <https://code.djangoproject.com/ticket/33933#comment:1>

Django

unread,
Aug 17, 2022, 11:07:44 AM8/17/22
to django-...@googlegroups.com
#33933: Cannot use GeoIP2 without setting up gdal anymore
-------------------------------+--------------------------------------
Reporter: Florent Messa | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: 4.1
Severity: Normal | Resolution: duplicate

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* type: Uncategorized => Bug
* resolution: => duplicate


Comment:

Duplicate of #33886.

--
Ticket URL: <https://code.djangoproject.com/ticket/33933#comment:2>

Reply all
Reply to author
Forward
0 new messages