Opened 4 years ago

Closed 4 years ago

#12605 closed (fixed)

ImproperlyConfigured improperly imported in Spatialite base wrapper

Reported by: tmcw Owned by: jbronn
Component: GIS Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The Spatialite-specific code in spatialite/ 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 might want to be tighter in catching all exceptions as problems identifying the Spatialite version.

Attachments (1)

ImproperlyConfigured_bug.diff (611 bytes) - added by tmcw 4 years ago.
Removes redundant import of exception class

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by tmcw

Removes redundant import of exception class

comment:1 Changed 4 years ago by jbronn

  • Component changed from Contrib apps to GIS
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to jbronn
  • Patch needs improvement unset

comment:2 Changed 4 years ago by jbronn

  • Resolution set to fixed
  • Status changed from new to closed

(In [12310]) Fixed #12605 -- Removed redundant import of ImproperlyConfigured. Thanks, tmcw.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.