#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:
> 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
New description:
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#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070182abbd7f0d-a1a807bb-3170-463d-a637-59aa201b57ca-000000%40eu-central-1.amazonses.com.