Neo4Django创建的节点在manage.py shell中不起作用

时间:2014-08-18 11:42:47

标签: python django neo4j neo4django

我在我的Linux系统上安装了neo4j-2.1.3并运行了服务器。我创建了模型"出版商"在我的应用程序中然后在manage.py shell中,每当我使用

保存节点时
  
    
      

来自BooksGraph.models import Publisher       P = Publisher.objects.create(名称='阳光',地址=' B-1/196#39)

    
  

弹出一个很长的错误:

追踪(最近一次呼叫最后一次):

  1.   

    文件"",第1行,在文件中   " /usr/local/lib/python2.7/dist-packages/neo4django/db/models/manager.py" ;,   第42行,在create return self.get_query_set()。create(** kwargs)File   " /usr/local/lib/python2.7/dist-packages/neo4django/db/models/query.py" ;,   第1052行,在create return super(NodeQuerySet,self).create(** kwargs)   文件   " /usr/local/lib/python2.7/dist-packages/django/db/models/query.py" ;,   第377行,创建obj.save(force_insert = True,using = self.db)文件   " /usr/local/lib/python2.7/dist-packages/neo4django/db/models/base.py" ;,   第325行,在save return super(NodeModel,self).save(using = using,   ** kwargs)文件" /usr/local/lib/python2.7/dist-packages/django/db/models/base.py",   第463行,在save self.save_base中(using = using,   force_insert = force_insert,force_update = force_update)文件   " /usr/local/lib/python2.7/dist-packages/neo4django/db/models/base.py" ;,   第341行,在save_base中自我._save_neo4j_node(使用)文件"",   第2行,在_save_neo4j_node文件中   " /usr/local/lib/python2.7/dist-packages/neo4django/db/models/base.py" ;,   第111行,trans_meodod   len(connections [args [0] .using] ._ transactions)< 1:文件   " /usr/local/lib/python2.7/dist-packages/neo4django/utils.py" ;, line   313,在 getitem ** db [' OPTIONS'])文件中   " /usr/local/lib/python2.7/dist-packages/neo4django/neo4jclient.py" ;,   第29行,在 init super(EnhancedGraphDatabase,   self)。 init (* args,** kwargs)文件   " /usr/local/lib/python2.7/dist-packages/neo4jrestclient/client.py" ;,   第74行,在 init 响应=请求(** self._auth).get(self.url)   文件   " /usr/local/lib/python2.7/dist-packages/neo4jrestclient/request.py" ;,   第63行,返回self._request(' GET',url,headers = headers)文件   " /usr/local/lib/python2.7/dist-packages/neo4django/db/的初始化的.py&#34 ;,   第60行,在_request标题中)文件   " /usr/local/lib/python2.7/dist-packages/neo4jrestclient/request.py" ;,   第198行,在_request auth = auth,verify = verify)文件   " /usr/local/lib/python2.7/dist-packages/requests/sessions.py" ;, line   468,在返回self.request(' GET',url,** kwargs)文件   " /usr/local/lib/python2.7/dist-packages/requests/sessions.py" ;, line   456,在请求中resp = self.send(prep,** send_kwargs)文件   " /usr/local/lib/python2.7/dist-packages/requests/sessions.py" ;, line   559,在send r = adapter.send(request,** kwargs)文件中   " /usr/local/lib/python2.7/dist-packages/requests/adapters.py" ;, line   378,在send raise ProxyError(e)ProxyError :('无法连接到   代理。',错误(113,'没有主机路由')


1 个答案:

答案 0 :(得分:0)

这听起来像网络设置问题。你能检查一下这个库试图连接到哪个URL,以及那个URL真的发送到你当地的Neo4j服务器吗?