当前位置: 代码迷 >> 综合 >> [Python] [py2neo][neo4j] TypeError: Parameters of type map are not supported
  详细解决方案

[Python] [py2neo][neo4j] TypeError: Parameters of type map are not supported

热度:60   发布时间:2023-09-29 18:24:46.0

使用py2neo时报错:
TypeError: Parameters of type map are not supported

以下为问题复现:

from py2neo import Graph,Node,Relationship
g = py2neo.Graph('http://localhost:7474', user='yudeng',password='yudeng')
a = Node("Person", name="Alice")
b = Node("Person", name="Bob")
ab = Relationship(a, "KNOWS", b)
print(a)
g.create(a)

经过各种搜索之后,找到问题在于py2neo 4.0版本的bug
解决方法为,重新安装py2neo

pip install py2neo==3.1.2

致谢原始解决方案链接:
https://stackoverflow.com/questions/51376422/how-to-create-one-node-in-py2neo-correctly

  相关解决方案