#2805: wxGUI: attribute table opening bug when driver is undefined
-----------------------------------+-------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: svn-trunk
Keywords: attribute, db.connect | CPU: Unspecified
Platform: Linux |
-----------------------------------+-------------------------
Today one of our users got this crash:
{{{
Traceback (most recent call last):
File "/home/ANDREA/src/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/lmgr/frame.py", line 1767, in
OnShowAttributeTable
selection = selection)
File "/home/ANDREA/src/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/dbmgr/manager.py", line 109, in __init__
self.CreateDbMgrPage(parent = self, pageName =
'manageLayer')
File "/home/ANDREA/src/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/dbmgr/base.py", line 730, in
CreateDbMgrPage
self.pages[pageName] = DbMgrLayersPage(parent = parent,
parentDbMgrBase = self)
File "/home/ANDREA/src/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/dbmgr/base.py", line 2494, in __init__
parentDialog = self)
File "/home/ANDREA/src/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/dbmgr/base.py", line 2722, in __init__
self.defaultTables =
self._getTables(self.defaultConnect['driver'],
KeyError
:
'driver'
}}}
I discovered that for unknown reasons no DB connection was defined:
{{{
db.connect -p
ERROR: Database connection not defined. Run db.connect.
}}}
Hopefully easy to catch with a try-except condition?
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2805>
GRASS GIS <https://grass.osgeo.org>