Your message dated Thu, 04 Oct 2018 10:05:05 +0000
with message-id <e1g80vf-0005fy...@fasolo.debian.org>
and subject line Bug#910240: fixed in python-django 1:1.11.16-3
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 ow...@bugs.debian.org
immediately.)


-- 
910240: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910240
Debian Bug Tracking System
Contact ow...@bugs.debian.org 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.11.16-3

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 910...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Chris Lamb <la...@debian.org> (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 ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 04 Oct 2018 10:38:34 +0100
Source: python-django
Binary: python-django python-django-common python-django-doc python3-django
Built-For-Profiles: nocheck
Architecture: source all
Version: 1:1.11.16-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Modules Team 
<python-modules-t...@lists.alioth.debian.org>
Changed-By: Chris Lamb <la...@debian.org>
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.11.16-3) unstable; 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:
 d4accb43541a47e97d404346c55f7ee112a33717 3160 python-django_1.11.16-3.dsc
 d239a75ac8a55155ad232ba4d2910c6bc6a03834 25460 
python-django_1.11.16-3.debian.tar.xz
 2739046e292cb344932a9457fa5b214d99577c46 1535964 
python-django-common_1.11.16-3_all.deb
 c8b684fa30ff08e71bbb5106a309771397ba80b3 2632540 
python-django-doc_1.11.16-3_all.deb
 cf02de9b1b027ae3fc5316eb80917373cc0e51aa 915204 python-django_1.11.16-3_all.deb
 2a16ab391c3935952274ac956d3ded00233c4807 8555 
python-django_1.11.16-3_amd64.buildinfo
 129fbaa98ab265179a227ae8852451d38244b749 915028 
python3-django_1.11.16-3_all.deb
Checksums-Sha256:
 19d7e71a84c6ace0ef750d51e9b43e9b328bead3f4b0c8b4e9c9ec294368d85e 3160 
python-django_1.11.16-3.dsc
 b3bba7e9834f127761642c964bf5ef78e285daeebea6683f13094160c091e066 25460 
python-django_1.11.16-3.debian.tar.xz
 f01a63ef42f916693b7b7f86f85e02fb50c029dd5fe757a2623b0b7108a670a7 1535964 
python-django-common_1.11.16-3_all.deb
 ec7efd78ea8b19e043c8f0663591da31e2e0933166bfa08d4b64b35ebcd20353 2632540 
python-django-doc_1.11.16-3_all.deb
 7ff6f4e3523864347b4a0de31c548c7cd41ae763877fd67423b95ec9056279ae 915204 
python-django_1.11.16-3_all.deb
 f9e75673c719d00ef26ed1fb8e972db3eace15a0d810cc1808a82c21e37a0a70 8555 
python-django_1.11.16-3_amd64.buildinfo
 85064d33608e872b6a3b7c9fcfe0e7489433f46df9d78a4bf86e23947efb8bcc 915028 
python3-django_1.11.16-3_all.deb
Files:
 0650df243385e67b0d029fa7453b3f3d 3160 python optional 
python-django_1.11.16-3.dsc
 4c15a66793911f776cc7cc81586e5ea0 25460 python optional 
python-django_1.11.16-3.debian.tar.xz
 26fa0867c53d75036651921dfa42806e 1535964 python optional 
python-django-common_1.11.16-3_all.deb
 e8debe94469dd0f839c08f28e04ef017 2632540 doc optional 
python-django-doc_1.11.16-3_all.deb
 350711e3a0165441127dea8450cf862a 915204 python optional 
python-django_1.11.16-3_all.deb
 d39c6a66048607658688bd11fbd48f08 8555 python optional 
python-django_1.11.16-3_amd64.buildinfo
 a458247af324a3710058d7b4bd085c24 915028 python optional 
python3-django_1.11.16-3_all.deb

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAlu14QkACgkQHpU+J9Qx
Hlhv3w//UCLppkld1Zrxw2S2idb7Q4r6wn7GMODXtJPMb8aWHZu1wcb8TZNsRJcw
dl5qaiWH//+E2xsFycaeOY/9gdCchzH75Qtk8HDBmDoBg9pO9RKbPIb0jd29XhEf
d7MXxvZfduVTVoCqaX/+bp2EY1AiXhnSM0RBF/pxjWRiQPcr5rmXWFebGR9mkHZf
WE2YewN3JZQcdUQOL27M1/LMdAd96jZC35rLItmqVDbW4jmYt6rW3GGstp2ggJGU
geTuevIznYzYNEr4Ypv3n1TRZcbKOi67q1dd+8eRe3gEEYJidErSE0Pu/+Pk7XCv
rNVhWSZrYaUo1a6ZIwLxZcdYVzhTg/pcazmtGCgKt4z4gFYNHfg/WVTmnVJuCy2X
AOpFDsRzJ52/ko4VledzNWgIn4BSqKG1+t0KsDUi/mNXfdRgzIu97JOIgQBOR06b
Vwh48qn0GIKdRnwg5zhgX6g22Wech7qb4I9GnAzrWgs4MGroRp50p7HECUBRg81L
A4ZITqTzAquk9G/5B7K/ZzoVunMQEbuvZQHu5h06Tze+UMLV/QiPRCXRi9ZONXAu
w2x2Wnh/2FCL8YvN2T+Kd8+ooWoJKSYeVS+3QUskrIRM/WAjYbR0f1pwjljCcWEk
l8rSjYYK2toC2Wvp34xLfKRX9QqqgKrfvnzZVWV0MZmWmV8qKXs=
=YXGL
-----END PGP SIGNATURE-----

--- End Message ---
_______________________________________________
Python-modules-team mailing list
Python-modules-team@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to