【问题标题】:Neo4jrestclient error Unable to get rootNeo4jrestclient 错误无法获取 root
【发布时间】:2014-07-28 11:31:43
【问题描述】:

之前我的代码运行良好,突然在运行我的 Python 脚本时:

**from neo4jrestclient.client import GraphDatabase
from bottle import route, run,template,post,request,redirect
gdb = GraphDatabase("http://localhost:7474/db/data/")*
@route('/home')
def open_home():
    username=""
    parties=[]
    return template('home',dict(username=username,parties=parties))

出现此错误:

Traceback(最近一次调用最后一次): > 文件“bottle3.py”,第 4 行,在 > gdb = > GraphDatabase("localhost:7474/db/data/") 文件 > "/usr/local/lib/ python2.7/dist-packages/neo4jrestclient/client.py", > > line 78, in init > raise NotFoundError(response.status_code, "Unable get root") neo4jrestclient.exceptions.NotFoundError: Code > [411]:需要长度。 > 客户端必须指定 Content-Length.. Unable > get root

【问题讨论】:

  • 我相信您正在由另一个用户运行脚本
  • 您运行的是哪个版本的 neo4jrestclient 和 Neo4j?
  • linux 2.1.3 版

标签: python neo4j


【解决方案1】:

您是否删除了数据库中的所有节点?

您升级到 Neo4j >=2.0 了吗?使用release of 2.0.0 RC1,数据库不再包含默认节点0(参考节点),以前称为root。

我可以推荐neo4jdb-python 获取最新的python 驱动程序。

【讨论】:

  • 我已经尝试添加当时给出的示例电影数据库的节点,上次我遇到这个问题我通过插入新节点来解决它,但这次没有运气。
猜你喜欢
  • 1970-01-01
  • 2018-12-09
  • 1970-01-01
  • 2023-03-25
  • 1970-01-01
  • 2014-02-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多