I'm trying to run a cypher query from a python script.
The part of the function that does it looks like this:
with driver.session() as session:
result = session.run("match (place:{})\
where place.name = \"{}\"\
return (place)"
.format(joined_labels, name))
print ("result = {}".format(result))
for r in result:
print ("r={}".format(r))
It runs fine and returns a neo4j.BoltStatementResult
object that I can iterate over (there is only one r
in that result
, and it's a Node
).
The actual query I wish to run is this:
with driver.session() as session:
result = session.run("match (arch:Person:Architect)-[b:BUILT]->(place:{})\
where place.name = \"{}\"\
return (arch), (place)"
.format(joined_labels, name))
print ("result = {}".format(result))
for r in result:
print ("r={}".format(r))
It returns a neo4j.BoltStatementResult
object as well, but I seemingly can't iterate over it.
Meanwhile, both of these queries run fine in Neo4j browser.
The script is run on Ubuntu 18.04, with python 3.7.5, neo4j 4.0.4, and neo4j driver 1.7.6.
Why might this be happening?