0

我正在尝试学习Neo4j在我的 django 项目中使用数据库。我Neo4Djangogithub存储库安装。当我尝试从我的模型创建一个新对象时,按照它的neo4j 教程,我遇到了这个错误:

KeyError:'GremlinPlugin'

我正在使用Python 2.7, Django Version 1.5.8,Pycharm 3

我的模型是:

class Movie(models.NodeModel):
    # name of the movie
    title = models.StringProperty()

我创建对象的控制台代码是:

from nodes_app.models import Movie
movie = Movie.objects.create(title='a')

这是错误的控制台输出:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Python27\lib\site-packages\neo4django-0.1.8-py2.7.egg\neo4django\db\models\manager.py", line 43, in create
    return self.get_query_set().create(**kwargs)
  File "C:\Python27\lib\site-packages\neo4django-0.1.8-py2.7.egg\neo4django\db\models\query.py", line 1307, in create
    return super(NodeQuerySet, self).create(**kwargs)
  File "C:\Python27\lib\site-packages\django-1.5.8-py2.7.egg\django\db\models\query.py", line 416, in create
    obj.save(force_insert=True, using=self.db)
  File "C:\Python27\lib\site-packages\neo4django-0.1.8-py2.7.egg\neo4django\db\models\base.py", line 325, in save
    return super(NodeModel, self).save(using=using, **kwargs)
  File "C:\Python27\lib\site-packages\django-1.5.8-py2.7.egg\django\db\models\base.py", line 546, in save
    force_update=force_update, update_fields=update_fields)
  File "C:\Python27\lib\site-packages\neo4django-0.1.8-py2.7.egg\neo4django\db\models\base.py", line 341, in save_base
    self._save_neo4j_node(using)
  File "<string>", line 2, in _save_neo4j_node
  File "C:\Python27\lib\site-packages\neo4django-0.1.8-py2.7.egg\neo4django\db\models\base.py", line 98, in trans_method
    ret = func(*args, **kw)
  File "C:\Python27\lib\site-packages\neo4django-0.1.8-py2.7.egg\neo4django\db\models\base.py", line 369, in _save_neo4j_node
    typesToIndex=type_names_to_index)
  File "C:\Python27\lib\site-packages\neo4django-0.1.8-py2.7.egg\neo4django\neo4jclient.py", line 179, in gremlin_tx
    return self.gremlin(script, tx=True, **params)
  File "C:\Python27\lib\site-packages\neo4django-0.1.8-py2.7.egg\neo4django\neo4jclient.py", line 127, in gremlin
    ext = self.extensions.GremlinPlugin
  File "C:\Python27\lib\site-packages\neo4jrestclient\client.py", line 2176, in __getattr__
    self._dict[attr] = ExtensionModule(self._extensions[attr], self._auth)
KeyError: 'GremlinPlugin'
4

1 回答 1

1

似乎 Neo4j Django 驱动程序依赖于GremlinNeo4j 服务器上的插件。从 Neo4j 2.0 开始,Gremlin 已从发行版中删除,但仍可作为贡献包使用,请参阅那里的说明。

于 2014-07-03T14:14:45.910 回答