0

I am using Py2neo 3.0 and Neo4j 3.0 to create nodes. Followed the transaction statements to create the nodes but failed.

Syntax:

tx = graph.begin()
a= Node("Person1", name="Alicedemo")
tx.create(a)
tx.commit

And, then did the same without transaction, and succeeded.

Syntax:

a= Node("Person1", name="Alicedemo")
graph.create(a)

Is their any problem with transaction in py2neo or else I am missing anything there?

Jack Daniel
  • 2,527
  • 3
  • 31
  • 52

1 Answers1

1

I believe you forgot to use parenthesis

tx.commit()
Portable
  • 323
  • 1
  • 9