1

Currently production in use versions.

NEO4J==3.2.2

python3.8 py2neo==3.1.2

Now upgrading towards newer version

py2neo==4.2.0

I am facing errors.

with py2neo==3.1.2 this code was working fine

selector = NodeSelector(graph)
student_node = selector.select("school", studen_key=studen_key).first()

After upgrading the version I have updated the code like this

selector = NodeMatcher(graph)
student_node = selector.match("school", studen_key=studen_key).first()

but it is throwing errors.

py2neo.database.ClientError: SyntaxError: Invalid input '{': expected "+" or "-" (line 1, column 39 (offset: 38))
"MATCH (_:student) WHERE _.student_key = {1} RETURN _"

1 Answers1

0

There is a mismatch between the py2neo version and the Neo4j version here. Upgrading to py2neo version 4.anything will still give you a version that is several years old, built for the Neo4j of that time. Since then, the parameter syntax has changed, so you cannot use a driver that old with a more recent version of Neo4j.

Upgrade to a far more recent version of py2neo instead.

Nigel Small
  • 4,475
  • 1
  • 17
  • 15