gpt4 book ai didi

python - py2neo - 由于身份验证失败,客户端未经授权

转载 作者:行者123 更新时间:2023-12-03 14:43:18 25 4
gpt4 key购买 nike

我试图从 python 3 连接到 neo4j,但我总是遇到这个错误:

---------------------------------------------------------------------------
AuthError Traceback (most recent call last)
<ipython-input-20-e407bdc814a1> in <module>
----> 1 graph.create(cloves)

~/.local/lib/python3.6/site-packages/py2neo/database.py in create(self, subgraph)
353 :class:`.Subgraph`
354 """
--> 355 with self.begin() as tx:
356 tx.create(subgraph)
357

~/.local/lib/python3.6/site-packages/neobolt/direct.py in on_failure(self, metadata)
755 message = metadata.get("message", "Connection initialisation failed")
756 if code == "Neo.ClientError.Security.Unauthorized":
--> 757 raise AuthError(message)
758 else:
759 raise ServiceUnavailable(message)

AuthError: The client is unauthorized due to authentication failure.

我的代码是:

from py2neo import Graph
from py2neo import Node, Relationship

graph = Graph("bolt://localhost:7687", user="neo4j", password="neo4j")
cloves = Node('Person', name='Cloves', born='1989')

graph.create(cloves)

我默认检查了我在neo4j上注册的用户。

print screen from my neo4j browser

我尝试了一些方法,例如创建架构师角色。即便如此,当我声明用户时,我也会遇到同样的错误。

最佳答案

问题解决了,通知需要重置默认用户密码neo4j here .

关于python - py2neo - 由于身份验证失败,客户端未经授权,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54910752/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com