py2neo.database.status.Unauthorized 在 Neo4j 3.0.3 中
py2neo.database.status.Unauthorized in Neo4j 3.0.3
我尝试从 python 程序访问 Neo4j 3.0 数据库,但显示以下错误:
文件 "C:\Python27\lib\py2neo\database\http.py",第 157 行,在 get raise Unauthorized(self.uri.string) 中
py2neo.database.status.Unauthorized: http://localhost:7474/db/data/
已打开同一主题的 post,但它是 2.2 版。
我的代码是:
authenticate("localhost:7474", "neo4j", "neo4j")
graph_db = Graph("http://localhost:7474/db/data/")
这与 2.2 版本中的完全相同,因为它在 http://py2neo.org/v3/database.html 中指定。
我也试过这样做:
graph_db = Graph("http://localhost:7474/db/data/", user="neo4j", password="neo4j")
但我得到了相同的结果。
有谁知道问题出在哪里?
提前致谢。
通过网页界面访问数据库(http://localhost:7474/browser/),首次登录需设置新密码
那么,这应该有效:
from py2neo
g = Graph('http://localhost:7474/db/data', user='neo4j', password='new_password')
我尝试从 python 程序访问 Neo4j 3.0 数据库,但显示以下错误:
文件 "C:\Python27\lib\py2neo\database\http.py",第 157 行,在 get raise Unauthorized(self.uri.string) 中 py2neo.database.status.Unauthorized: http://localhost:7474/db/data/
已打开同一主题的 post,但它是 2.2 版。
我的代码是:
authenticate("localhost:7474", "neo4j", "neo4j")
graph_db = Graph("http://localhost:7474/db/data/")
这与 2.2 版本中的完全相同,因为它在 http://py2neo.org/v3/database.html 中指定。
我也试过这样做:
graph_db = Graph("http://localhost:7474/db/data/", user="neo4j", password="neo4j")
但我得到了相同的结果。
有谁知道问题出在哪里?
提前致谢。
通过网页界面访问数据库(http://localhost:7474/browser/),首次登录需设置新密码
那么,这应该有效:
from py2neo
g = Graph('http://localhost:7474/db/data', user='neo4j', password='new_password')