Opened 2 years ago

Last modified 2 years ago

#33933 closed Bug

Cannot use GeoIP2 without setting up gdal anymore — at Version 1

Reported by: Florent Messa Owned by: nobody
Component: GIS Version: 4.1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Florent Messa)

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

Change History (1)

comment:1 by Florent Messa, 2 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top