Bug report #17353

DB Manager TypeError on PostGIS loading

Added by Tomasz Nycz over 6 years ago. Updated over 6 years ago.

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

Description

When trying to add layer from DB Manager for any PostGIS table, traceback is thrown. On yesterday build it was crashing, though.

TypeError: '>=' not supported between instances of 'NoneType' and 'int'
Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/db_manager/db_manager.py", line 90, in itemChanged
self.refreshTabs()
File "/usr/share/qgis/python/plugins/db_manager/db_manager.py", line 133, in refreshTabs
self.info.showInfo(item)
File "/usr/share/qgis/python/plugins/db_manager/info_viewer.py", line 74, in showInfo
self._showTableInfo(item)
File "/usr/share/qgis/python/plugins/db_manager/info_viewer.py", line 133, in _showTableInfo
html += table.info().toHtml()
File "/usr/share/qgis/python/plugins/db_manager/db_plugins/info_model.py", line 361, in toHtml
ret = self.getTableInfo()
File "/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/info_model.py", line 230, in getTableInfo
ret = TableInfo.getTableInfo(self)
File "/usr/share/qgis/python/plugins/db_manager/db_plugins/info_model.py", line 296, in getTableInfo
general_info = self.generalInfo()
File "/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/info_model.py", line 87, in generalInfo
if self.table.rowCount is not None or self.table.rowCount >= 0:
TypeError: '>=' not supported between instances of 'NoneType' and 'int'

Wersja Pythona: 3.6.3 (default, Oct 3 2017, 21:45:48) [GCC 7.2.0]
Wersja QGIS: 2.99.0-Master Master, 99b1c74

Lokalizacja Pythona:
/home/mechanik/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gml_application_schema_toolbox/extlibs
/usr/share/qgis/python/plugins/processing
/usr/share/qgis/python
/home/mechanik/.local/share/QGIS/QGIS3/profiles/default/python
/home/mechanik/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python36.zip
/usr/lib/python3.6
/usr/lib/python3.6/lib-dynload
/usr/local/lib/python3.6/dist-packages
/usr/lib/python3/dist-packages
/home/mechanik/.local/share/QGIS/QGIS3/profiles/default/python

History

#1 Updated by Giovanni Manghi over 6 years ago

  • Regression? changed from No to Yes
  • Priority changed from Normal to High

#2 Updated by Salvatore Larosa over 6 years ago

  • Resolution set to duplicate

ref. #16533

#3 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF