#13070 closed (fixed)
Wrong exception on django.contrib.gis from SVN
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | GIS | Version: | dev |
Severity: | Keywords: | geodjango | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi guys, I can't use the gis app with Django trunk. The same project works fine with Django 1.1.
See the traceback: http://dpaste.com/hold/170253/
Change History (8)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:3 by , 15 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Sorry... follow more info.
How reproduce the bug:
cd /tmp django-admin.py startproject geodjangotest cd geodjangotest wget http://www.gaia-gis.it/spatialite/init_spatialite-2.3.sql.gz gunzip init_spatialite-2.3.sql.gz spatialite spatialite.db < init_spatialite-2.3.sql
Then setup your settings.py
with the follow settings:
... DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = 'spatialite.db' ... INSTALLED_APPS = ( ... 'django.contrib.gis', )
Try now run ./manage.py syncdb
. Occurs this exception:
... File "/home/semente/.local/lib/python/site-packages/django/db/__init__.py", line 75, in <module> connection = connections[DEFAULT_DB_ALIAS] File "/home/semente/.local/lib/python/site-packages/django/db/utils.py", line 92, in __getitem__ conn = backend.DatabaseWrapper(db, alias) File "/home/semente/.local/lib/python/site-packages/django/contrib/gis/db/backends/spatialite/base.py", line 33, in __init__ self.ops = SpatiaLiteOperations(self) File "/home/semente/.local/lib/python/site-packages/django/contrib/gis/db/backends/spatialite/operations.py", line 128, in __init__ (self.connection.settings_dict['NAME'], msg)) django.core.exceptions.ImproperlyConfigured: Cannot determine the SpatiaLite version for the "sqlite3.db" database (error was "no such function: spatialite_version"). Was the SpatiaLite initialization SQL loaded on this database?
The same procedure works with Django 1.1.
Software versions:
SpatiaLite version ..: 2.3.0 Supported Extensions: - 'VirtualShape' [direct Shapefile access] - 'VirtualText' [direct CSV/TXT access] - 'VirtualNetwork [Dijkstra shortest path] - 'RTree' [Spatial Index - R*Tree] - 'MbrCache' [Spatial Index - MBR cache] - 'VirtualFDO' [FDO-OGR interoperability] - 'SpatiaLite' [Spatial SQL - OGC] PROJ.4 Rel. 4.6.1, 21 August 2008 GEOS version 3.1.0-CAPI-1.5.0
...and pysqlite 2.5.6 with load extension support and sqlite3 3.6.16. Ubuntu 9.10 Karmic.
comment:4 by , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
If this is a regression, it needs to be addressed for 1.2
comment:5 by , 15 years ago
I was unable to reproduce this error:
I am using:
Xubuntu 9.10
Django version 1.2 beta 1 SVN-12855
sqlite 3.6.16
spatialite 2.3.0
comment:6 by , 15 years ago
Well, on Ubuntu 10.04 Lucid I have the same problem. What is your pysqlite version?
comment:7 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Closing invalid. I don't deny there's a problem, but a stack trace and the comment "can't use gis" doesn't help us reproduce it. Reopen if you care to provide *specific* details on how to reproduce the problem.