Hi, 

I'm using QGIS 2.99.0-Master rev. b2587b7 on Ubuntu 16.04 64bits.

When I tried to open a SQL query on a POSTGIS database I've got the following 
error while trying to open the saved connection to the database: 

2016-10-28T15:58:35     1       Traceback (most recent call last):

                          File 
"/usr/share/qgis/python/plugins/db_manager/db_model.py", line 440, in rowCount

                            self._refreshIndex(parent, True)

                          File 
"/usr/share/qgis/python/plugins/db_manager/db_model.py", line 491, in 
_refreshIndex

                            if item.populate():

                          File 
"/usr/share/qgis/python/plugins/db_manager/db_model.py", line 166, in populate

                            if not connection.connect():

                          File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py", line 
99, in connect

                            return self.connectToUri(uri)

                          File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/plugin.py", line 108, in 
connectToUri

                            self.db = self.databasesFactory(self, uri)

                          File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py", line 
69, in databasesFactory

                            return PGDatabase(connection, uri)

                          File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py", line 
107, in __init__

                            Database.__init__(self, connection, uri)

                          File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/plugin.py", line 217, in 
__init__

                            self.connector = self.connectorsFactory(uri)

                          File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py", line 
110, in connectorsFactory

                            return PostGisDBConnector(uri)

                          File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/connector.py", 
line 67, in __init__

                            self.connection = 
psycopg2.connect(expandedConnInfo.encode('utf-8'))

                          File 
"/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 164, in connect

                            conn = _connect(dsn, 
connection_factory=connection_factory, async=async)

                        TypeError: argument 1 must be str, not bytes


I can load postgis layers from the same connection without problems.
What can I do?
Thanks,



Gustavo


                        
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to