Closed
Description
I have this function that is called in a write transaction:
from uuid import uuid4
:
def add_technique(tx, title, topic):
tx.run("MERGE (t:Technique {title: $title, uuid: $uuid}) "
"MERGE (topic:Topic {name: $topic}) "
"MERGE (t)-[:BELONGS_TO]->(topic)",
topic=topic, title=title, uuid=uuid4())
:
with driver.session() as session:
for s in sections:
session.write_transaction(add_technique, s['title'], s['topic'])
:
Please note that the third parameter uuid of the cypher statement is passed an incorrect type because uuid4() returns a uuid.UUID instance, not a string as I thought.
When running the program it hangs on the first call to tx.run. No exceptions or messages. The only option is to kill the program.
When the paramater value is corrected to str(uuid4()) everything is fine.
Using Neo4j community v3.2
Python driver 1.5.0
Python 3.6.3 on OSX