python error: cannot connect to any known routers
Sean Markin
I have tried to establish a connection using this simple python example, and I get the error - py2neo.errors.ServiceUnavailable: Cannot connect to any known routers
Please help
from py2neo import Graph, Node, Relationship
g = Graph("<my db>", auth=("neo4j", "<my password>")) # replace with your own credentials
#tx = g.begin()
a = Node("Person", name="Alice")
g.create(a)
b = Node("Person", name="Bob")
ab = Relationship(a, "KNOWS", b)
g.create(ab)
g.commit()
g.exists(ab)