Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-29-2020 11:12 AM
Hello all,
I have a graph that I want to query. I am using py2neo to do the task. However, when I ran the query, It results in the following error even though I installed the stable release.
Graph.run("MATCH (a) WHERE n.name=$x RETURN n.id, labels(n)", x="Length").evaluate()
Traceback (most recent call last):
File "", line 1, in
TypeError: run() missing 1 required positional argument: 'cypher'
08-30-2020 11:59 AM
Did the question text box capitalize the G in Graph or is this the way it is written in your code? Graph is the name of the class you import from py2neo. The run method should be called on an instance of Graph, not directly on the class name.
See here for an example: https://py2neo.org/v4/database.html
08-30-2020 12:31 PM
Shouldn't your query be MATCH (n) not MATCH (a) as you use n. in the rest of the query?
08-31-2020 06:25 PM
That's right. Thank you for your comment!
All the sessions of the conference are now available online