Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "definition of service "NULL" not found" when Service is not set on Connection #147

Open
christian-skjetne opened this issue Mar 5, 2024 · 1 comment
Labels

Comments

@christian-skjetne
Copy link

Problem
When trying to load db connections that has a blank "Service" field it throws the following error:
CRITICAL dbname:databasename, definition of service "NULL" not found

To Reproduce
Create a db without setting the "Service" field. Error is thrown when pgRoutingLayer is loaded or trying to refresh the db list in the plugin.

The bug seems to be that the plugin expects this property to be None when it is not set, but it is actually "NULL" (string)
It can be fix by checking if the service property is "NULL" and setting it to None if it is:

 if service == "NULL":
            service = None

in the connect method of the Connection class in "postgis.py" after loading the settings.
I guess it could mess up if your service is actually called "NULL"

@gitlsl
Copy link

gitlsl commented Mar 18, 2024

same issue+1
also sometime it show dbname:pg, connection to server at "127.0.0.1", port 5432 failed: fe_sendauth: no password supplied but qgis can connect the pg success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants