cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

SyntaxError py2neo match.first()

Hi! I'm trying to run this line of code using the py2neo library for Python:

graph.nodes.match("x",id_=3).first()

But then I get this SyntaxError:

ClientError: SyntaxError: Invalid input '{': expected "+" or "-" (line 1, column 27 (offset: 26)) "MATCH (_:x) WHERE .id = {1} RETURN _"
............................................^...........................................................................................

I think this is not a problem from the node, I've already checked it.

Thanks for your help 🙂

2 REPLIES 2

What version of py2neo are you using? You should be on 5.x ?

The syntax for parameters changed in Neo4j 4.0 (Jan 2020) from {name} to $name

I'm using the 4.2.0 version