TypeError neo4jrestclient append()获得意外的关键字参数“data”

2024-10-01 09:19:11 发布

您现在位置:Python中文网/ 问答频道 /正文

我在python中使用neo4jrestclient for Neo4j,在本地它可以完美地工作。当我使用webfection托管它时,它返回以下错误:

TypeError at /add/
append() got an unexpected keyword argument 'data'
Django Version: 1.6.1
Exception Type: TypeError
Exception Value:    
append() got an unexpected keyword argument 'data'
Exception Location: /home/kokos/lib/python2.7/neo4jrestclient/client.py in create, line 1036

我不知道问题出在哪里。提前谢谢。在


Tags: anfordata错误exceptionargumentkeywordat
1条回答
网友
1楼 · 发布于 2024-10-01 09:19:11

我也有同样的问题。请参阅下面的最小示例。似乎query调用扰乱了库的某些内部状态。我会进一步调查。在

>>> gdb.node()
<Neo4j Node: http://localhost:7474/db/data/node/140>
>>> gdb.query("match (n) where 0 > 1 return n")
<neo4jrestclient.query.QuerySequence object at 0x00000000037A5C88>
>>> gdb.node()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python34\lib\site-packages\neo4jrestclient\client.py", line 1000, in __call__
    return self.create(**kwargs)
  File "C:\Program Files\Python34\lib\site-packages\neo4jrestclient\client.py", line 1036, in create
    returns=NODE)
TypeError: append() got an unexpected keyword argument 'data'

这是因为query将相应的事务存储在全局变量中,并且在以后的调用中尝试使用该事务。但是Transaction和{}是不同的不兼容类。见https://github.com/versae/neo4j-rest-client/issues/103。在

相关问题 更多 >