python - 由于身份验证失败,客户端未经授权
问题描述
嗨,我正在尝试通过 python 调用图表,但出现此错误
作者:由于认证失败,客户端未授权。
这是我的代码:
import csv
from py2neo import Graph, Node
N_MOVIES = 1000
N_RATINGS = 1000
N_TAGS = 1000
N_LINKS = 1000
USERNAME = "arooj"
PASS = "abcd" #default
graph = Graph("bolt://localhost:7687", auth = (USERNAME, PASS))
def main():
createGenreNodes()
print("Step 1 out of 4: loading movie nodes")
loadMovies()
print("Step 2 out of 4: loading rating relationships")
loadRatings()
print("Step 3 out of 4: loading tag relationships")
loadTags()
print("Step 4 out of 4: updating links to movie nodes")
loadLinks()
解决方案
首次登录时,我们必须设置密码。
执行以下操作:
docker exec -it name_of_docker bash
密码壳 -u neo4j -p neo4
这将要求输入新密码。更改密码后,在您的代码中传递新密码。
推荐阅读
- tensorflow - 无法在 python 3.9 上安装 tensorflow
- android - 使用 Visual Studio 2019 让 ADB 在 Pixel 5 / Android 11 上工作
- javascript - HTML拖放,dragover事件返回子元素而不是父元素
- reactjs - React - 如何将流类型分配给导出的模块?
- python - AttributeError:“Line2D”对象没有属性“cmap”
- excel - Visual Basic excel vba字符串中最大的数据类型失败
- reactjs - 反应原生的布尔文本输入
- arrays - 尝试使用 image-proc 工具箱中的 regionprops 测量高尔夫球的直径
- list - Flutter calendar Firestore“类型'QuerySnapshot'不是'List'类型的子类型
'" - reactjs - 检查网络响应能力的最佳方法