我已安装 neo4j-2.1.3 并在我的 Linux 系统上运行服务器。我在我的应用程序中创建了模型“发布者”。然后在 manage.py shell 中,每当我保存一个节点时
从 BooksGraph.models 导入出版商 p=Publisher.objects.create(name='Sunny',address='b-1/196')
弹出一个长错误:
回溯(最近一次通话最后):
文件“”,第 1 行,在文件“/usr/local/lib/python2.7/dist-packages/neo4django/db/models/manager.py”,第 42 行,在 create return self.get_query_set().create( **kwargs) 文件“/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 行,在保存中返回 super(NodeModel, self).save(using=using, **kwargs) 文件“/usr/local/lib/python2.7/dist-packages/django/db/models/base.py”,第 463 行,保存 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 self._save_neo4j_node(使用)文件“”,第2行,在 _save_neo4j_node 文件“/usr/local/lib/python2.7/dist-packages/neo4django/db/models/base.py”,第 111 行,在 trans_method len(connections[args[0].using]._transactions) < 1:文件“/usr/local/lib/python2.7/dist-packages/neo4django/utils.py”,第 313 行,在/usr/local/lib/python2.7/dist-packages/neo4django/utils.py”,第 313 行,在/usr/local/lib/python2.7/dist-packages/neo4django/utils.py”,第 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 response = Request(**self._auth).get (self.url) 文件“/usr/local/lib/python2.7/dist-packages/neo4jrestclient/request.py”,第 63 行,在 get return self._request('GET', url, headers=headers) 文件中" /usr/local/lib/python2.7/dist-packages/neo4django/db/init.py”,第 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”,第 468 行,在 get return self.request('GET', url, **kwargs) 文件“/usr/local/lib /python2.7/dist-packages/requests/sessions.py”,第 456 行,在请求 resp = self.send(prep, **send_kwargs) 文件“/usr/local/lib/python2.7/dist-packages/ requests/sessions.py”,第 559 行,在发送 r = adapter.send(request, **kwargs) 文件“/usr/local/lib/python2.7/dist-packages/requests/adapters.py”,第 378 行, 在发送 raise ProxyError(e) ProxyError: ('Cannot connect to proxy.', error(113, 'No route to host'))