By following these amazing tutorials of Anita Graser An osm2po Quick Start and pgRouting on OSM using osm2po, I was able to use osm2po tool successfully on Windows 7 (x64) with PostgreSQL version 9.5 and pgRouting version 2.1.0. I successfully generated .sql file (at_2po_4pgr.sql), imported the same into my postgres routing DB and then installed QGIS pgRouting Layer plugin through Plugins Manager. Now, I am trying to test pgr_djikstra algorithm using pgRouting Layer plugin but I am running into problem during this last step of the above mentioned tutorial.

I am already connected to my postgres DB through DB Manager of QGIS but in my pgRouting Layer dialogue box, I am never "shown as connected" to my postgres DB as shown in following figure. I tried to press refresh button and drop down list many times but no use.

Screen shot of pgRouting Layer DB connectivity problem

The problem seems to be with database connection through Python. Because, whenever I try to run 'dijkstra' algorithm (just wanted to give it a try anyways) I am getting a Python execution error as shown below. It shows db connection problem in pgRouting python executable file (which is in pgRouting Layer plugin directory). Following are the screen shots of errors I am getting.



Although, Python2.7 is the default version and its already added to my system path (in environment variables).

Do I need to modify the indicated python file?

1 Answer 1


Well, thanks to the previous relevant posts at GIS-SE: pgRouting Layer Plugin Db error and unable to implement pgRouting Layer plugin I figured out my mistake by myself. When I connected to my postgres db through QGIS DB Manager, I did not save username and password which was a mistake and resulted in db connection failure every time.

I have saved username and password and now able to use pgRouting Layer Plugin flawlessly! :)

  • 1
    You should mark your answer as winning :)
    – Regina Obe
    Commented Aug 5, 2016 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.