赞
踩
代码如下
- from py2neo import Graph, Node, Relationship
-
- g = Graph("http://localhost:7474//browser")
- n = Node("test", name="test")
- try:
- g.create(p1)
- except Exception as e:
- print(e)
运行时g.create(p1)报如下错
py2neo.errors.ProtocolError: Cannot decode response content as JSON
连接时指定数据库名称,使用下面的的连接方式
g = Graph("http://localhost:7474//browser", name='neo4j')
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。