Your message dated Fri, 02 Nov 2018 22:02:11 +0000 with message-id <[email protected]> and subject line Bug#910240: fixed in python-django 1:1.10.7-2+deb9u3 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: 1:1.10.7-2+deb9u3 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, 11 Oct 2018 18:47:12 +0100 Source: python-django Binary: python-django python3-django python-django-common python-django-doc Built-For-Profiles: nocheck Architecture: source all Version: 1:1.10.7-2+deb9u3 Distribution: stretch Urgency: medium Maintainer: Debian Python Modules Team <[email protected]> Changed-By: Chris Lamb <[email protected]> Description: python-django - High-level Python web development framework (Python 2 version) python-django-common - High-level Python web development framework (common) 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 (1:1.10.7-2+deb9u3) stretch; urgency=medium . * Default to supporting Spatialite >= 4.2. (Closes: #910240) Checksums-Sha1: 9d8519a68722e4e67f2d334aac221beacc9dc525 2804 python-django_1.10.7-2+deb9u3.dsc 8754dbc1f72849ee85bb0cb83f61c26910cbe775 36500 python-django_1.10.7-2+deb9u3.debian.tar.xz 1f566b3b007d774ffaaf939d063528bfbb57e5e9 1513858 python-django-common_1.10.7-2+deb9u3_all.deb fb7c4ff4e651efab5749cd0c482c300a9468f215 2532036 python-django-doc_1.10.7-2+deb9u3_all.deb 87b9db217cbb9f835ab6095a64d572eb78ea12f0 903616 python-django_1.10.7-2+deb9u3_all.deb 8e2b7de58606bbed2a656a59cdb8e4bc5c4e0f05 9329 python-django_1.10.7-2+deb9u3_amd64.buildinfo b514e0ea5b2d016f616593b232f051a0873e1dff 885106 python3-django_1.10.7-2+deb9u3_all.deb Checksums-Sha256: 4540d12889764ba3129c63050c3f04ed9d6c87083479913203fd9e9a2835acc7 2804 python-django_1.10.7-2+deb9u3.dsc ffbbe36215bd35d8704a4df8433c4a181bbf0c24fbc93c316cdd2710087b05f9 36500 python-django_1.10.7-2+deb9u3.debian.tar.xz 2deabb476e1d195abe64d432d5ac147ffce8d9f311af01ffb5648727aaf0de58 1513858 python-django-common_1.10.7-2+deb9u3_all.deb a38e83e0acf840399bc4dae5b6c1a96dbd9bd340dfdfa4684bcad0d5535f3de0 2532036 python-django-doc_1.10.7-2+deb9u3_all.deb 03d7621aea99730385e5bef8487df30893168bacf75358201b662ad091e06c84 903616 python-django_1.10.7-2+deb9u3_all.deb 02590b24543861f7f4ca374d3ced967cca4173142ef906373a5f35f265a154a5 9329 python-django_1.10.7-2+deb9u3_amd64.buildinfo d32a3a17595b7450dd336ad7740220d3dac76d154f553242a21280b7a2588938 885106 python3-django_1.10.7-2+deb9u3_all.deb Files: 8eb46d0ed40da007ba39648cc4f4d286 2804 python optional python-django_1.10.7-2+deb9u3.dsc d7da76aa36b788be5b296733fdfa375d 36500 python optional python-django_1.10.7-2+deb9u3.debian.tar.xz a806165206d21241b7a6b37bb8345724 1513858 python optional python-django-common_1.10.7-2+deb9u3_all.deb 4f693a944daddbb7d18fc1d7d61fa4e2 2532036 doc optional python-django-doc_1.10.7-2+deb9u3_all.deb af604ffd84360f2203e60ddba3ed7750 903616 python optional python-django_1.10.7-2+deb9u3_all.deb 2d857f8a16e913935ab65a3b72b6f481 9329 python optional python-django_1.10.7-2+deb9u3_amd64.buildinfo efd1e602a417b0c483f7c2cddf04be99 885106 python optional python3-django_1.10.7-2+deb9u3_all.deb -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAlvbf0wACgkQHpU+J9Qx Hljwpw//X/hA0Yv5w+EQySeRzJh5yEn9CSE2MzfVCUnxeXTcnZUVZDMzWNTusuoy MXzvuf/285U+pIZVyIq0Txz93kgTwiRGAnSFJdQBr+DD+AjipRzoc7FRCZSUVPVz SaQ5JGTzBrviwQT+rmgLqrlIsT4CBA6hiU3WJToYcZHQgjZvKZi6+YWMj3XsyS47 9oSjs7M2+RM5stpR9ODRenO/3bHxqbek414L50dzsz5OwCzIhMoNweJUbzDNvz6J ufCYLfXG+/d3SgkJ/g+FutYqffyYdiA1njmV0D8TPXAmz5p0omUCkYpqmIZ0fqcQ kMOZSrOW/r0fvRmRFYUsxKnxFtE9tUsVocKGyhp2lad/DqAyCE1RKql7Vlb8Yc4e T/vDAJZNqEdkFpwga3K8nHCKkmOjsdc9jDQ3d+0NE/XqMDqt3dGPtflph2bNxvmS YTwpGHIxMYVGsDOkaayZtXLcq9SGFoS4uKPHVmsh5j7Rkoc3vHeF269FhKBAkMbh 119TdahWFdjyDDBO4lAT5ldx7Wk92x94nl5YEqQrs8ubNihddd77WtXH2hWtdY5c HSnpQEv79dIhjK7689LPuGsSZ6wTsz3excWHGrG64QAiKdYBzU8yA67AIaymz+qz fjc3YWyp8J1rtZ0Hk6yq7JjQW6yzZCDeky1mxCrnjFNwhKy9jg8= =ys5O -----END PGP SIGNATURE-----
--- End Message ---
_______________________________________________ Python-modules-team mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/python-modules-team
