gpt4 book ai didi

python - 灯泡/Neo4j : authentication error when creating Graph object

转载 作者:太空宇宙 更新时间:2023-11-04 05:51:36 25 4
gpt4 key购买 nike

我是新手,正在尝试学习 Python、Bulbs、Neo4j。当我只是尝试创建一个 Graph 对象时,我不知道如何调试一开始就出现的这个问题。这是回溯:

 File "test.py", line 12, in __init__
self.graph = Graph()
File "C:\Python27\lib\site-packages\bulbs\neo4jserver\graph.py", line 55, in __init__
super(Graph, self).__init__(config)
File "C:\Python27\lib\site-packages\bulbs\base\graph.py", line 58, in __init__
self.vertices = self.build_proxy(Vertex)
File "C:\Python27\lib\site-packages\bulbs\base\graph.py", line 124, in build_proxy
return self.factory.build_element_proxy(element_class, index_class)
File "C:\Python27\lib\site-packages\bulbs\factory.py", line 19, in build_element_proxy
primary_index = self.get_index(element_class,index_class,index_name)
File "C:\Python27\lib\site-packages\bulbs\factory.py", line 27, in get_index
index = index_proxy.get_or_create(index_name)
File "C:\Python27\lib\site-packages\bulbs\neo4jserver\index.py", line 87, in get_or_create
resp = self.client.get_or_create_vertex_index(index_name,index_config=config)
File "C:\Python27\lib\site-packages\bulbs\neo4jserver\client.py", line 742, in get_or_create_vertex_index
return self.create_vertex_index(index_name, *args, **kwds)
File "C:\Python27\lib\site-packages\bulbs\neo4jserver\client.py", line 697, in create_vertex_index
resp = self.request.post(path, params)
File "C:\Python27\lib\site-packages\bulbs\rest.py", line 131, in post
return self.request(POST, path, params)
File "C:\Python27\lib\site-packages\bulbs\rest.py", line 184, in request
http_resp = self.http.request(uri, method, body, headers)
File "C:\Python27\lib\site-packages\httplib2\__init__.py", line 1608, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "C:\Python27\lib\site-packages\httplib2\__init__.py", line 1359, in _request
for authorization in self._auth_from_challenge(host, request_uri, headers, response, content):
File "C:\Python27\lib\site-packages\httplib2\__init__.py", line 1243, in _auth_from_challenge
challenges = _parse_www_authenticate(response, 'www-authenticate')
File "C:\Python27\lib\site-packages\httplib2\__init__.py", line 317, in _parse_www_authenticate
raise MalformedHeader("WWW-Authenticate")
httplib2.MalformedHeader: WWW-Authenticate

如果重要的话,我正在运行 Windows 7。谁能帮忙?

谢谢!

最佳答案

根据 https://code.google.com/p/httplib2/issues/detail?id=289当您访问的服务发送 401 并请求身份验证时,httplib2 会抛出该错误。

从 2.2 版开始,Neo4j 内置了默认启用的身份验证,请参阅 http://neo4j.com/docs/stable/security-server.html#security-server-auth .

因此您可以在创建连接时向灯泡提供您的用户名和密码(不知道灯泡的详细信息,因此无法在此处提供更准确的建议)或者您可以通过设置关闭 neo4j 服务器中的身份验证

dbms.security.auth_enabled=false

neo4j-server.properties 中。

关于python - 灯泡/Neo4j : authentication error when creating Graph object,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29981491/

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