Advertisement
Guest User

Untitled

a guest
Jul 19th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. from neo4j.v1 import GraphDatabase, basic_auth
  2. driver = GraphDatabase.driver("bolt://localhost", auth=basic_auth(user = "neo4j", password = "root"))
  3. session = driver.session()
  4. session.run("CREATE (a:Person {name:'Bob'})")
  5. result = session.run("MATCH (a:Person) RETURN a.name AS name")
  6. for record in result:
  7. print(record["name"])
  8. session.close()
  9.  
  10. Traceback (most recent call last):
  11. File "D:/Work/MySQL_neo4j_Importer/dumping_ingredients.py", line 3, in <module>
  12. session = driver.session()
  13. File "C:Python27libsite-packagesneo4jv1session.py", line 148, in session
  14. session = Session(self)
  15. File "C:Python27libsite-packagesneo4jv1session.py", line 461, in __init__
  16. self.connection = connect(driver.host, driver.port, driver.ssl_context, **driver.config)
  17. File "C:Python27libsite-packagesneo4jv1connection.py", line 403, in connect
  18. s = create_connection((host, port))
  19. File "C:Python27libsocket.py", line 557, in create_connection
  20. for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  21. socket.gaierror: [Errno 11004] getaddrinfo failed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement