使用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