Ansys Learning Forum Maintenance

NOTICE: We will be performing backend maintenance of our Learning Forum from April 5 to April 12, 2021. The result will be a new infrastructure but with little impact to user experience and design. Currently the forum is accessible in read-only mode as we complete our final migration. Thank you for your patience. For urgent issues please visit HERE.

Python and neo4j ANSYS — Ansys Learning Forum

Python and neo4j ANSYS

I am a new learner to python and to neo4j and I want to do the connection with Python. I am using neo4j version 3.0.3.

I have written the code in Python file referring a tutorial from python programming tutorial, I have also changed the password, since my password is root:

from neo4j.v1 import GraphDatabase, basic_auth

driver = GraphDatabase.driver("bolt://localhost", auth=basic_auth(user = "neo4j", password = "root"))

session = driver.session()"CREATE (a:Person {name:'Bob'})")

result ="MATCH (a:Person) RETURN AS name")

for record in result:



But on running it, I am getting the following errors:

Traceback (most recent call last):

 File "D:/Work/MySQL_neo4j_Importer/", line 3, in <module>

  session = driver.session()

 File "C:\Python27\lib\site-packages\neo4j\v1\", line 148, in session

  session = Session(self)

 File "C:\Python27\lib\site-packages\neo4j\v1\", line 461, in __init__

  self.connection = connect(, driver.port, driver.ssl_context, **driver.config)

 File "C:\Python27\lib\site-packages\neo4j\v1\", line 403, in connect

  s = create_connection((host, port))

 File "C:\Python27\lib\", line 557, in create_connection

  for res in getaddrinfo(host, port, 0, SOCK_STREAM):

socket.gaierror: [Errno 11004] getaddrinfo failed


Sign In or Register to comment.