【发布时间】:2014-03-14 03:59:54
【问题描述】:
基本上,我在使用这些库时遇到了不合理的错误:
django==1.4.3
pyelasticsearch==0.6
simplejson==3.3.0
django-haystack==2.1.0
我得到的错误是:
- 来自 python2.7/site-packages/haystack/query.py:
index_queryset() got an unexpected keyword argument 'using'
我只是删除它,它可以在本地运行 - /srv/www/projects/k-state-union/lib/haystack/backends/elasticsearch_backend.py:
raise MissingDependency("The 'elasticsearch' backend requires the installation of 'pyelasticsearch'. Please refer to the documentation.")
当pyelasticsearch导入失败时会出现此错误。如果我让它自然失败: - /srv/www/.virtualenvs/k-state-union/lib/python2.6/site-packages/pyelasticsearch/client.py:
from simplejson import JSONDecodeError
在 python 解释器中工作。
这些错误似乎表明我没有使用pyelasticsearch 和haystack 的预期版本。我需要做什么才能启动并运行它?
【问题讨论】:
-
你在使用
virtualenv吗? -
@HieuNguyen 是的,我确实使用 virtualenv。
标签: django django-haystack pyelasticsearch