Bug report #17353

DB Manager TypeError on PostGIS loading

Added by Tomasz Nycz about 4 years ago. Updated about 4 years ago.

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


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
File "/usr/share/qgis/python/plugins/db_manager/db_manager.py", line 133, in refreshTabs
File "/usr/share/qgis/python/plugins/db_manager/info_viewer.py", line 74, in showInfo
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:


#1 Updated by Giovanni Manghi about 4 years ago

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

#2 Updated by Salvatore Larosa about 4 years ago

  • Resolution set to duplicate

ref. #16533

#3 Updated by Giovanni Manghi about 4 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF