我正在使用库 py2neo 开发一个 webapp。
我还将它推送到 Heroku,它与 Graphene DB 连接,而在本地它与 Neo4j 数据库连接。
当我在 Heroku 上使用我的 webapp 时,我收到了这个错误:
ValueError: ('Transaction %r is not open on this connection', <py2neo.client.http.HTTPTransaction object at 0x7fe3fe8f9e80>)
由于我还有debug=True
,我可以看到当 webapp 尝试合并关系时发生了错误
rel = Relationship(...
graph.merge(rel)
该错误发生了一次,然后不再发生。但是,错误是什么意思?
我无法理解此错误的文档:
def _assert_transaction_open(self, tx): if tx is not self._transaction: raise ValueError("Transaction %r is not open on this connection", tx)