Bug report #20736

QGIS Database Manager fails to connect

Added by Christopher Hicks almost 2 years ago. Updated almost 2 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:DB Manager
Affected QGIS version:3.4.2 Regression?:No
Operating System:Windows 10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:28556

Description

I have uninstalled and reinstalled QGIS, deleted all qgis folders from the user/AppData folder, and still getting these errors any time I try to connect to my PostGIS server. I can connect to the server with browser and that works normally.

Messages:
Python error : An error has occurred while executing Python code: See message log (Python Error) for more details.

Python Error Log:

2018-12-05T15:41:30 WARNING Traceback (most recent call last):
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\db_manager\db_model.py", line 444, in rowCount
self._refreshIndex(parent, True)
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\db_manager\db_model.py", line 493, in refreshIndex
if item.populate():
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\db_manager\db_model.py", line 170, in populate
if not connection.connect():
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 104, in connect
return self.connectToUri(uri)
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\db_manager\db_plugins\plugin.py", line 109, in connectToUri
self.db = self.databasesFactory(self, uri)
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 68, in databasesFactory
return PGDatabase(connection, uri)
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 112, in init
Database.
_init__(self, connection, uri)
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\db_manager\db_plugins\plugin.py", line 218, in init
self.connector = self.connectorsFactory(uri)
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 115, in connectorsFactory
return PostGisDBConnector(uri)
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\connector.py", line 108, in init
self._checkGeometryColumnsTable()
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\connector.py", line 168, in _checkGeometryColumnsTable
self.has_geometry_columns_access = priv0
TypeError: 'NoneType' object is not subscriptable

History

#1 Updated by Giovanni Manghi almost 2 years ago

  • Status changed from Open to Feedback

Works fine here on a clean QGIS 3.4.2 installation on a clean Win10 (EN) installation.

#2 Updated by Christopher Hicks almost 2 years ago

Turned out to be a server side issue. My HDD array failed and was causing inaccessibility for the PostgreSQL server.

#3 Updated by Alessandro Pasotti almost 2 years ago

  • Resolution set to invalid
  • Status changed from Feedback to Closed

Also available in: Atom PDF