Bug report #12645

DB Manager: python error when clicking on missing/broken Spatialite connections

Added by Giovanni Manghi almost 5 years ago. Updated almost 5 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:DB Manager
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:20758

Description

Traceback (most recent call last):
  File "/usr/share/qgis/python/plugins/db_manager/db_model.py", line 408, in rowCount
    self._refreshIndex(parent, True)
  File "/usr/share/qgis/python/plugins/db_manager/db_model.py", line 460, in _refreshIndex
    if item.populate():
  File "/usr/share/qgis/python/plugins/db_manager/db_model.py", line 158, in populate
    DlgDbError.showError(unicode(e), None)
  File "/usr/share/qgis/python/plugins/db_manager/dlg_db_error.py", line 56, in showError
    dlg = DlgDbError(e, parent)
  File "/usr/share/qgis/python/plugins/db_manager/dlg_db_error.py", line 42, in __init__
    self.setMessage(sanitize(e.msg))
AttributeError: 'unicode' object has no attribute 'msg'

That was not the case in previous QGIS releases where a better error message was given to the user.

Associated revisions

Revision 102f6d31
Added by Jürgen Fischer almost 5 years ago

db manager: fix BaseError handing (fixes #12645)

Revision 54d52873
Added by Jürgen Fischer over 4 years ago

db manager: fix BaseError handing (fixes #12645; backport 102f6d3)

History

#1 Updated by Jürgen Fischer almost 5 years ago

  • Subject changed from DB Manager: pyhton error when clicking on missing/broken Spatialite connections to DB Manager: python error when clicking on missing/broken Spatialite connections

#2 Updated by Jürgen Fischer almost 5 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF