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

标签 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。谁能帮忙?

谢谢!

最佳答案

根据 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/

相关文章:

python - BeautifulSoup:打开本地和http html文件

c++ - Python 导入和使用单元格(带有 linux .so 文件)

python - 如何取回 keras 损失函数(张量)的误差值

java - Neoclipse 图中缺少节点

灯泡对象初始化方法中 fget 参数的 Python 灯泡框架示例

python - 您可以将 BulbFlow(灯泡)Python ORM 与 OrientDB 的图形模式约束一起使用吗?

python - 将 pyodbc.rows 列表转换为 pandas Dataframe 需要很长时间

java - 禁用 Neo4j 图形数据库的锁定?

java - 创建的节点不显示在 neo4j 的控制台中

groovy - 如何在 gremlin 中定义返回与 gremlin shell 中相同结果的函数?