[Qgis-developer] Error in DB Manager reading toplogy.layer

Paolo Cavallini cavallini at faunalia.it
Fri Jan 24 08:28:25 PST 2014


Hi all.
Clicking on topology.layer of a postgis_topology DB consistently returns
an error.
Anyone confirms?
All the best.
===
Errore durante l'esecuzione di codice Python:

Traceback (most recent call last):
  File "/usr/share/qgis/python/plugins/db_manager/db_manager.py", line
83, in itemChanged
    self.refreshTabs()
  File "/usr/share/qgis/python/plugins/db_manager/db_manager.py", line
134, in refreshTabs
    self.info.showInfo( item )
  File "/usr/share/qgis/python/plugins/db_manager/info_viewer.py", line
75, in showInfo
    self._showTableInfo(item)
  File "/usr/share/qgis/python/plugins/db_manager/info_viewer.py", line
132, in _showTableInfo
    html += table.info().toHtml()
  File
"/usr/share/qgis/python/plugins/db_manager/db_plugins/info_model.py",
line 352, in toHtml
    ret = self.getTableInfo()
  File
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/info_model.py",
line 194, in getTableInfo
    ret = TableInfo.getTableInfo(self)
  File
"/usr/share/qgis/python/plugins/db_manager/db_plugins/info_model.py",
line 285, in getTableInfo
    general_info = self.generalInfo()
  File
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/info_model.py",
line 95, in generalInfo
    if len( filter(lambda fld: fld.primaryKey, self.table.fields()) )
File "/usr/share/qgis/python/plugins/db_manager/db_plugins/plugin.py",
line 613, in fields
    self._fields = map(lambda x: self.tableFieldsFactory(x, self), fields)
  File "/usr/share/qgis/python/plugins/db_manager/db_plugins/plugin.py",
line 613, in
    self._fields = map(lambda x: self.tableFieldsFactory(x, self), fields)
  File
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py", line
229, in tableFieldsFactory
    return PGTableField(row, table)
  File
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py", line
311, in __init__
    for con in self.table().constraints():
  File "/usr/share/qgis/python/plugins/db_manager/db_plugins/plugin.py",
line 660, in constraints
    self._constraints = map(lambda x: self.tableConstraintsFactory(x,
self), constraints)
  File "/usr/share/qgis/python/plugins/db_manager/db_plugins/plugin.py",
line 660, in
    self._constraints = map(lambda x: self.tableConstraintsFactory(x,
self), constraints)
  File
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py", line
232, in tableConstraintsFactory
    return PGTableConstraint(row, table)
  File
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py", line
334, in __init__
    self.foreignMatchType = TableConstraint.matchTypes[row[9]]
KeyError: u's'

Versione Python:
2.7.6 (default, Dec 30 2013, 14:39:47)
[GCC 4.8.2]


Versione di QGIS:
2.0.1-Dufour Dufour, 96dd172

Percorso Python: ['/home/paolo/.qgis2/python/plugins/processing',
'/home/paolo/.qgis2/python/plugins/LecoS',
'/home/paolo/.qgis2/python/plugins/processinglwgeomprovider',
'/usr/share/qgis/python', '/home/paolo/.qgis2/python',
'/home/paolo/.qgis2/python/plugins', '/usr/share/qgis/python/plugins',
'/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PILcompat',
'/usr/lib/python2.7/dist-packages/gst-0.10',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.7',
'/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode',
'/home/paolo/.qgis2/python/plugins/DigitizingTools/tools', '.',
'/usr/share/qgis/python/plugins/fTools/tools', '~/.qgis/python']

-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html


More information about the Qgis-developer mailing list