neo4jpy2neo

Trying to connect to Neo4j Desktop using py2neo and receiving ``ServiceUnavailable: Cannot connect to any known routers`" when I run a query


I renamed the existing example database from Movies RDBM to Movies and changed the password to pwd.

from py2neo import Graph
db=Graph("neo4j://neo4j:pwd@localhost:7687", name="Movies" )

No errors for the above

db.run("MATCH (n:Movie) RETURN n").to_table()

The above fails with ServiceUnavailable: Cannot connect to any known routers

what am I doing wrong ?


Solution

  • I was using WSL and Jupyter Notebooks but Neo4j was running in Windows so 127.0.0.1 was pointing to the WSL loopback and there was nothing there to receive the API calls