I upgraded to py2neo 2.0 and the code I used for streaming and writing results to file doesn't work any more. The error I am getting is TypeError: 'CypherResource' object is not callable
.
from py2neo import Graph
from py2neo.packages.httpstream import http
http.socket_timeout = 9999
graph = Graph()
query="""
MY QUERY
"""
result=graph.cypher(graph,query)
with open('myfile','w') as f:
for record in result.stream():
v=record.values
I assume the error is in graph.cypher(graph,query), but I was not successful in fixing the error.