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

Cant connect to database #133

Closed
moritzsproll opened this issue Dec 1, 2020 · 12 comments
Closed

Cant connect to database #133

moritzsproll opened this issue Dec 1, 2020 · 12 comments
Labels

Comments

@moritzsproll
Copy link

moritzsproll commented Dec 1, 2020

I have a connection to the database with postgis, but i cant connect the database with pgrouting. (refer to screenshots) The field where i should put the database is grey. The SQL-Query in the DB Manager "SELECT pgr_version from pgr_version();" is giving me a result. My version is 3.00-rc1.
The python console is giving that error if i click the green reload button:
File "C:/Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\pgRoutingLayer\pgRoutingLayer.py", line 1255, in openHelp
db = self.actionsDb[dbname].connect()
KeyError: ''

Im just a starter with pgrouting, so excuse me if it's not a bug and maybe help me to solve my problem :D

frage1
frage2

@cayetanobv
Copy link
Member

Hi @moritzsproll . This error is probably because you are using the version of the plugin at QGIS-hub with pgRouting v3 (there are some incompatibilities). We are preparing a new version these days so you can wait for this new upgrade to test again (the new version probably will be available this week).

@moritzsproll
Copy link
Author

@cayetanobv Thanks a lot for your help ! Can I get the updated version out of the QGIS plugin "store" or should I download it manually from github and put it in the plugins folder of QGIS ?

@cayetanobv
Copy link
Member

You can take the code from github for now and test it. Soon you can have the new version in plugin hub. Remember to change folder name to pgRoutingLayer.

@moritzsproll
Copy link
Author

@cayetanobv i downloaded the plugin and renamed the folder, but I am getting an error. Where exactly should i change the name to pgRoutingLayer ? Thanks for your help !

@moritzsproll
Copy link
Author

@cayetanobv i almost tried everything, but im still getting this error. I think i named the folder correctly. Everything looks similar to the directory of other installed plugins.
error
...

@andyprasetya
Copy link

@cayetanobv : I think it is not a bug. Well, database configuration may have some caveats, and so far I do not have any trouble for operating pgRoutingLayer.

Here is my environment: I use QGIS 3.16.4 Hannover (LTR) and pgRoutingLayer 3.0.1, to be connected with PostgreSQL 13 + PostGIS 3.1.0. When configuring database connection via Data Source Manager, make sure DB username and password are stored.

db-config

I noticed that whenever I stored them, and refresh the connection list in pgRoutingLayer, the database connection would appear successfully. If I create another connection and not store the username and password, it will never be listed in pgRoutingLayer.

I hope this will help.

@andyprasetya
Copy link

Addition: Perhaps it is closely related to this #44 issue.

@jonath35
Copy link

After having stored username and passaword I ve got "definition of service "NULL" not found"
qgis 3.22.5

@sanak
Copy link
Member

sanak commented Sep 23, 2022

@jonath35

After having stored username and passaword I ve got "definition of service "NULL" not found" qgis 3.22.5

Thanks for information.
I encountered the same issue, but I couldn't reproduce the error after some operation (which I forgot it...).

By the way, we published pgRoutingLayer 3.0.2, so could you try to upgrade the plugin, then check the connection again ?
In the latest version, error message will be shown in Log Messsages panel's pgRouting Layer tab.
qgis-log-message-pgrouting-layer

@jonath35
Copy link

jonath35 commented Sep 26, 2022

Connection is OK with pgRoutingLayer 3.0.2

However none of the functions work with directed option enabled (pgrouting 3.3.0 , osm2pgrouting 2.3.8.1)
Sql querys work

No paths found in (U) ...

Thanks

@sanak
Copy link
Member

sanak commented Sep 30, 2022

@jonath35 Okay, thanks for confirmation!

About directed option issue, I will check it a bit.

@sanak
Copy link
Member

sanak commented Sep 30, 2022

@jonath35 I could reproduce the "directed" error, so I created the issue for that (#144).

Original issue (db connection) seems to be solved, so I close this issue.

@sanak sanak closed this as completed Sep 30, 2022
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

5 participants