bulls/Neo4j:创建图形对象时发生身份验证错误

2024-06-28 05:32:34 发布

您现在位置:Python中文网/ 问答频道 /正文

我是个新手,正在学习Python,bulls,Neo4j,我不知道如何调试这个问题,这个问题在我刚开始创建一个图形对象时就出现了。回溯如下:

 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

如果有关系的话,我是在Windows7上运行的。有人能帮忙吗?在

谢谢!在


Tags: inpyselfgetindexinitrequestlib
1条回答
网友
1楼 · 发布于 2024-06-28 05:32:34

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

因为版本2.2neo4j内置了默认启用的身份验证,请参见http://neo4j.com/docs/stable/security-server.html#security-server-auth。在

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

dbms.security.auth_enabled=false

neo4j-server.properties中。在

相关问题 更多 >