Bulbs / Neo4j:创建Graph对象时的身份验证错误

时间:2015-05-01 04:11:33

标签: python neo4j bulbs

我是新手并且正在尝试学习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上运行,如果这很重要的话。有人可以帮忙吗?

谢谢!

1 个答案:

答案 0 :(得分:1)

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

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

因此,您可以在创建连接时向灯泡提供用户名和密码(不知道灯泡的详细信息,因此无法在此处提供更精确的建议)或者您可以通过设置

dbms.security.auth_enabled=false
neo4j-server.properties中的