nakijun / qspatialite

Automatically exported from code.google.com/p/qspatialite
0 stars 0 forks source link

crash if database file removed externally - cannot load qspatialite #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. delete a database from outside of qgis
2. open qspatialite, you get the errors shown below and qspatialite does not 
load
3. workaround is to remove the database from qgis db manager

message box: 

Can't connect to DataBase: /backup/Etienne/tmp/myDB.sqlite
Error unable to open database file

python error:
An error has occured while executing Python code:

Traceback (most recent call last):
  File "/home/tourigny/.qgis//python/plugins/QspatiaLite/qspatialite.py", line 68, in run
    dlg = QspatiaLiteApp(self.iface)
  File "/home/tourigny/.qgis//python/plugins/QspatiaLite/QspatiaLiteApp.py", line 79, in __init__
    self.changeDb(max(0,self.connections['idx']))
  File "/home/tourigny/.qgis//python/plugins/QspatiaLite/QspatiaLiteApp.py", line 143, in changeDb
    self.drawTreeView()
  File "/home/tourigny/.qgis//python/plugins/QspatiaLite/QspatiaLiteApp.py", line 148, in drawTreeView
    model=self.db.createTreeModel()
  File "/home/tourigny/.qgis//python/plugins/QspatiaLite/Classes/Database.py", line 100, in createTreeModel
    self.getTables()
  File "/home/tourigny/.qgis//python/plugins/QspatiaLite/Classes/Database.py", line 73, in getTables
    header,data=self.executeQuery(query)
  File "/home/tourigny/.qgis//python/plugins/QspatiaLite/Classes/Database.py", line 44, in executeQuery
    cursor=self.connectionObject.cursor()
AttributeError: Database instance has no attribute 'connectionObject'

Python version:
2.7.2+ (default, Oct  4 2011, 20:41:12) 
[GCC 4.6.1]

QGIS version:
1.8.0-Lisboa Lisboa, c64bb9d

Original issue reported on code.google.com by etourign...@gmail.com on 27 Aug 2012 at 7:01

GoogleCodeExporter commented 9 years ago
This error happens if you have stored your DB on a temporary disk (usb key, 
....).

I'll try to fix this in the next version

Original comment by romain.r...@gmail.com on 30 Aug 2012 at 1:04

GoogleCodeExporter commented 9 years ago
I have the same issues! and can't remove the links, neither in db manager nor 
in qspatialite!

Original comment by kay.cichini on 18 Nov 2014 at 1:24

GoogleCodeExporter commented 9 years ago
Will be fixed in the next release

Original comment by romain.r...@gmail.com on 9 Feb 2015 at 9:55