小编Clo*_*iva的帖子

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

我试图从 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.
Run Code Online (Sandbox Code Playgroud)

我的代码是:

from py2neo import Graph
from py2neo import Node, Relationship

graph …
Run Code Online (Sandbox Code Playgroud)

python neo4j python-3.x

6
推荐指数
1
解决办法
3457
查看次数

标签 统计

neo4j ×1

python ×1

python-3.x ×1