Closed GO1984 closed 1 year ago
Hi, you need to specify the port to connect to the database (default is 5432). In the next version of the tool, I will protect the connection creation dialog and add messages to warn against such errors.
Thank you for the fast reply. I use a service configured in a _.pgservice.conf service file on Win 11 so i cant add an additional service port. do you think the next version will cover this issue too?
I can see already the databases in the drop-down list but cant connect when clicking on the connect button
You probably need to fill in the following fields with correct authentication data.
Hi @eryk918 Please fix the issue as it is a blocker to using the tool, otherwise I will have to flag it as unapproved in the plugin list
You probably need to fill in the following fields with correct authentication data.
This doesn't fix it.
This doesn't work
This doesn't work
Thanks for the test scenario, I will analyze the situation in a moment and make a fix.
I made a correction to the PostgreSQL connection management dialog - so that it does not throw python errors, I also added error logging for establishing a connection - they will be displayed in the Log messages panel. Thanks to this, we will find out what errors the database client returns to us and we will be able to solve them. Several people tested this plugin and none received this specific error. I've uploaded this patch to the QGIS Repository and am waiting for approve. When it is available, download the update and send us the logs, we will solve this problem. 😄 Link to manual update file: https://github.com/eryk918/postgis_toolbox/releases/download/v1.1/postgis_toolbox.zip
I added a new connection to the database as a test and everything seems OK (PostgreSQL 15.4, PostGIS 3.4, Windows 10 Pro, QGIS 3.32.3).
Thank you for your fast action.
With version 1.10 i now can connect to the databases, by credentials in details. What still do not work, is the connection to the already in QGIS connected databases (wich connected by Postgresql services (here by .pg_service.conf). Information about the connection file you can find here: [https://www.postgresql.org/docs/current/libpq-pgservice.html] There is still an error message:
Maybe you want to fix this too?
The issue is that in the code https://github.com/eryk918/postgis_toolbox/blob/main/utils.py#L469-L486 there is no logic to handle service files logic.
Thank you for your fast action.
With version 1.10 i now can connect to the databases, by credentials in details. What still do not work, is the connection to the already in QGIS connected databases (wich connected by Postgresql services (here by .pg_service.conf). Information about the connection file you can find here: [https://www.postgresql.org/docs/current/libpq-pgservice.html] There is still an error message:
Maybe you want to fix this too?
To prevent this python error from being thrown, you need to edit and save old connections via Database Manager in PostGIS Toolbox. After yesterday's fixes, this action should automatically fix old - bad connections. .pg_service.conf files will not be supported for now, it will be necessary to manually fill in the dialogue with authentication credentials.
On Ubuntu, this is caused by missing driver QPSQL. I saw the following error
Qt: QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QSPATIALITE QTDS QTDS7
And I resolved it by running sudo apt install libqt5sql5-psql
Unfortunatelly i can't connect: PostgreSQL version 13.12 with PostGIS 3.4.0