Your message dated Thu, 04 Oct 2018 10:05:26 +0000 with message-id <[email protected]> and subject line Bug#910240: fixed in python-django 2:2.1.2-2 has caused the Debian Bug report #910240, regarding python3-django: GeoDjango incorrectly initializes spatialite (Error: /usr/lib/x86_64-linux-gnu/mod_spatialite.so: undefined symbol: sqlite3_spatialite_init) to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 910240: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910240 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: python3-django Version: 1:1.10.7-2 Today I decided to test GeoDjango, and set up a simple project using spatialite. But loading the spatialite database backend would fail like this: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/django/contrib/gis/db/backends/spatialite/base.py", line 59, in get_new_connection cur.execute("SELECT load_extension(%s)", (self.spatialite_lib,)) File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 337, in execute return Database.Cursor.execute(self, query, params) sqlite3.OperationalError: /usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined symbol: sqlite3_spatialite_init During handling of the above exception, another exception occurred: Traceback (most recent call last): File "./manage.py", line 22, in <module> execute_from_command_line(sys.argv) File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 367, in execute_from_command_line utility.execute() File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 359, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 294, in run_from_argv self.execute(*args, **cmd_options) File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 345, in execute output = self.handle(*args, **options) File "/usr/lib/python3/dist-packages/django/core/management/commands/makemigrations.py", line 109, in handle loader.check_consistent_history(connection, fake_initial=True) File "/usr/lib/python3/dist-packages/django/db/migrations/loader.py", line 277, in check_consistent_history applied = recorder.applied_migrations() File "/usr/lib/python3/dist-packages/django/db/migrations/recorder.py", line 65, in applied_migrations self.ensure_schema() File "/usr/lib/python3/dist-packages/django/db/migrations/recorder.py", line 52, in ensure_schema if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()): File "/usr/lib/python3/dist-packages/django/db/backends/base/base.py", line 231, in cursor cursor = self.make_debug_cursor(self._cursor()) File "/usr/lib/python3/dist-packages/django/db/backends/base/base.py", line 204, in _cursor self.ensure_connection() File "/usr/lib/python3/dist-packages/django/db/backends/base/base.py", line 199, in ensure_connection self.connect() File "/usr/lib/python3/dist-packages/django/db/backends/base/base.py", line 171, in connect self.connection = self.get_new_connection(conn_params) File "/usr/lib/python3/dist-packages/django/contrib/gis/db/backends/spatialite/base.py", line 64, in get_new_connection six.reraise(ImproperlyConfigured, ImproperlyConfigured(new_msg), sys.exc_info()[2]) File "/usr/lib/python3/dist-packages/django/utils/six.py", line 685, in reraise raise value.with_traceback(tb) File "/usr/lib/python3/dist-packages/django/contrib/gis/db/backends/spatialite/base.py", line 59, in get_new_connection cur.execute("SELECT load_extension(%s)", (self.spatialite_lib,)) File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 337, in execute return Database.Cursor.execute(self, query, params) django.core.exceptions.ImproperlyConfigured: Unable to load the SpatiaLite library extension "libspatialite.so.7" because: /usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined symbol: sqlite3_spatialite_init After asking for help om #debian-gis and reading the source of /usr/lib/python3/dist-packages/django/contrib/gis/db/backends/spatialite/base.py, I discovered a workaround is to add this line to settings.py: SPATIALITE_LIBRARY_PATH = 'mod_spatialite' According to sebastic on #debian-gis, the way to load spatialite changed in version 4.2, and now the correct way to load the library is to use "SELECT load_extension('mod_spatialite');", while the GeoDjango database backend try to load it using the full path to the library file, which for some reason is no longer working. -- Happy hacking Petter Reinholdtsen
--- End Message ---
--- Begin Message ---Source: python-django Source-Version: 2:2.1.2-2 We believe that the bug you reported is fixed in the latest version of python-django, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [email protected], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Chris Lamb <[email protected]> (supplier of updated python-django package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [email protected]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Format: 1.8 Date: Thu, 04 Oct 2018 10:22:37 +0100 Source: python-django Binary: python3-django python-django-doc Built-For-Profiles: nocheck Architecture: source all Version: 2:2.1.2-2 Distribution: experimental Urgency: medium Maintainer: Debian Python Modules Team <[email protected]> Changed-By: Chris Lamb <[email protected]> Description: python-django-doc - High-level Python web development framework (documentation) python3-django - High-level Python web development framework (Python 3 version) Closes: 910240 Changes: python-django (2:2.1.2-2) experimental; urgency=medium . * Default to supporting Spatialite >= 4.2. (Closes: #910240) * debian/control: Update libgdal's SONAME in Suggests. * Add libsqlite3-mod-spatialite to Suggests. Checksums-Sha1: 8eab0b90915aa22e3ed1141b3b300e3f88bf4828 2666 python-django_2.1.2-2.dsc 952ac0145602d21d639d75eab3cd06f2c41d6455 24264 python-django_2.1.2-2.debian.tar.xz 0676fc75566c215369a11fd6c395caf25fe09134 3040500 python-django-doc_2.1.2-2_all.deb 0ffe54c2afdc1dc48acd45c7fc05ee114ea6d0a3 7395 python-django_2.1.2-2_amd64.buildinfo 6a03f8262416ce0afe08d8e8602d9867315025aa 2587600 python3-django_2.1.2-2_all.deb Checksums-Sha256: b835fdf8932e413c389a95f73c1f006d14810d9f61ed84f1cb7cf24b4f850773 2666 python-django_2.1.2-2.dsc dbd1e50505fccf49e6b3a6c96c1d39a7c60d665764ec00e7506a5404487c2e58 24264 python-django_2.1.2-2.debian.tar.xz c66bec784c6b92dd749cbcff4f229a91b6fcd8435a04951de5693dc316e183a5 3040500 python-django-doc_2.1.2-2_all.deb c3c123e63a2fa98abc585bfc768b40a44bed4c8e5d492115f147db84d8d59d10 7395 python-django_2.1.2-2_amd64.buildinfo 00c4dc32f5f177c6839dbcf25e01e9510ef0857fcca8c642cecae12fe64163f2 2587600 python3-django_2.1.2-2_all.deb Files: 1dea65fdcba693effe058cf15abcccbe 2666 python optional python-django_2.1.2-2.dsc ea6911f9559d121b5ea9d49a59a6d37c 24264 python optional python-django_2.1.2-2.debian.tar.xz dc1d87bfeef56bef2c3772dced36df7d 3040500 doc optional python-django-doc_2.1.2-2_all.deb 0243d7809373f089045c651545b60782 7395 python optional python-django_2.1.2-2_amd64.buildinfo be2197fd58aae00ae059f306a47718e7 2587600 python optional python3-django_2.1.2-2_all.deb -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAlu14k4ACgkQHpU+J9Qx HljxWhAAsIIn/yFvkCBPaI3vu45U/c0/47GdGHEn8+PKHBFmMl+f7WEA8tpHCddm hiW4Pu4GABcnyA6LC2OcE+eWk7lzm6wfUNrdImBrtQ9B8xtOReUiZnHRUZZjmTy1 LoWWUH78GTL84HO77pbOqt5Uks6DwLrcO7mI2U6i6eGJizz8ASvP9tF08UQ2FUWT wlAC22w2lSitBl/CW6mGQmtrhoO4IzurPy7q4GL+wf4xaEDY1PAFR+2i193Sxpnf beNfAa+6xF4cwKKJBN2G7rbDUgwLQe8Gnty8jzWv6w5z1xHOgeorWdpP7+Zwskq2 Avn+Oc9qljtVUVBaWoVsxVJSjT+VQ9H6s3btQA8WQkPnkebCDT92SxmdaXaMMP84 pobVLe4PvA8ANTbwlJzgSB+zIVnDze2z+R5HD1FQrhY3vPeMmWkpx7EbYXYQCngQ vEGSdKo4UIQkwWIA9MfmfgUAvXv7VUMmgzdE0wHUB6JUUSL2yI7fKr24o9ZhgqUw Rg1jmEWFx+HUfVJkdxGXxsYEqZdNqbk3zDZDpOwTLjQ7xvCrAY4xaFd96DqeDG9n VlOOjb9jrO5pZaH+SeNWDfvPtb8vvInBtyeHIwg6eKnM3BehFHuEse1q3PnEG8TB uSoWXTjectpPXG2x2pnv3jVyAalx4deCQuwqDkUMdQxz5nGBjQo= =vti/ -----END PGP SIGNATURE-----
--- End Message ---
_______________________________________________ Python-modules-team mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/python-modules-team
