Opened 15 years ago
Closed 15 years ago
#12605 closed (fixed)
ImproperlyConfigured improperly imported in Spatialite base wrapper
Reported by: | tmcw | Owned by: | jbronn |
---|---|---|---|
Component: | GIS | Version: | dev |
Severity: | 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
The Spatialite-specific code in spatialite/base.py necessitated the use of this exception, so imported it for the entire module, but the existing code had a local import, so in many cases, ImproperlyConfigured is treated as an undefined local variable, this producing the error message
django.core.exceptions.ImproperlyConfigured: Cannot determine the SpatiaLite version for the "mapdemo.db" database (error was "local variable 'ImproperlyConfigured' referenced before assignment"). Was the SpatiaLite initialization SQL loaded on this database?
This patch removes the redundant import, allowing the correct exception to be reported. Also the code in operations.py might want to be tighter in catching all exceptions as problems identifying the Spatialite version.
Attachments (1)
Change History (3)
by , 15 years ago
Attachment: | ImproperlyConfigured_bug.diff added |
---|
comment:1 by , 15 years ago
Component: | Contrib apps → GIS |
---|---|
Owner: | changed from | to
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Removes redundant import of exception class