pythonherokuneo4jpy2neographenedb

ValueError: ('Transaction %r is not open on this connection', <py2neo.client.http.HTTPTransaction object at 0x7fe3fe8f9e80>)


I am developing a webapp using the library py2neo.

I also pushed it on Heroku, where it is connected with a Graphene DB, while locally it is connected with a Neo4j database.

As I was using my webapp on Heroku, I got this error:

ValueError: ('Transaction %r is not open on this connection', <py2neo.client.http.HTTPTransaction object at 0x7fe3fe8f9e80>)

Since I still have debug=True, I can see that the error happened when the webapp tryed to merge a relationship

rel = Relationship(...
graph.merge(rel)

This error happed once, and then did not occurr anymore. However, what does the error mean?

I cant't understand the documentation for this error:

def _assert_transaction_open(self, tx):
    if tx is not self._transaction:
        raise ValueError("Transaction %r is not open on this connection", tx)

Solution

  • You can safely ignore this. It's a bug which will be fixed in the next release.