cancel
Showing results forΒ 
Search instead forΒ 
Did you mean:Β 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

SyntaxError py2neo match.first()

Charles
Node

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