Trouble Connecting with python

I am testing the capabilities of neo4j and its interface with python for my project.

I seem to have a problem, which I don’t know if you can help with.

This is my code:

from py2neo import Graph, Node, Relationship

graph = Graph(my_uri, user="neo4j", password=my_password)

person = Node("Person", name="John Doe")

graph.create(person)

However, I get this error:

ServiceUnavailable: Cannot connect to any known routers

I wonder If anyone can help with that. Thanks.

@andrea.boghi

any reason to use py2neo and not the official Neo4j Python Bolt driver https://neo4j.com/deployment-center/#drivers-tab

1 Like