Agarwal Shubham
Agarwal Shubham

Reputation: 11

py2neo | TypeError: execute() got an unexpected keyword argument

I have seen a reference http://www.markhneedham.com/blog/2015/07/23/neo4j-loading-json-documents-with-cypher/ to Load JSON data with cypher to convert into graph-database structure. But I'm getting

TypeError: execute() got an unexpected keyword argument 'json'

My code snippet is -

graph = Graph()

with open('test.json') as data_file:
    json = json.load(data_file)

query = """
RETURN {json}
"""

# Send Cypher query.
print graph.cypher.execute(query, json = json)

Upvotes: 0

Views: 1031

Answers (1)

quemeraisc
quemeraisc

Reputation: 492

Very bad idea to call your variable json. Start by trying to call it some other name ...

Upvotes: 0

Related Questions