Bug report #9433
Error in DB Manager reading toplogy.layer
| Status: | Closed | ||
|---|---|---|---|
| Priority: | Normal | ||
| Assignee: | - | ||
| Category: | DB Manager | ||
| Affected QGIS version: | 2.0.1 | Regression?: | No |
| Operating System: | Easy fix?: | No | |
| Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
| Crashes QGIS or corrupts data: | No | Copied to github as #: | 18027 |
Description
Clicking on topology.layer of a postgis_topology DB consistently returns
an error. PostGIS 2.1.1. Tested on Debian unstable, on Windows, and on OSX.
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
History
#1
Updated by Sandro Santilli almost 12 years ago
Does the user you connect as have permissions to read topology.layer ?
#2
Updated by Paolo Cavallini almost 12 years ago
Yes. However, a test revealed that in master the problem does not show off. As no backporting will be done, I think this can be closed.
#3
Updated by Sandro Santilli almost 12 years ago
No backport ?
:'(
Any pointer to the fixing commit, in case anyone is willing to backport ?
#4
Updated by Paolo Cavallini almost 12 years ago
No idea, sorry - I just noticed that the error is gone when connecting from master
#5
Updated by Paolo Cavallini over 11 years ago
- Resolution set to fixed/implemented
- Status changed from Open to Closed