开发者

Haystack in INSTALLED_APPS results in Error: cannot import name openProc

开发者 https://www.devze.com 2023-04-02 22:20 出处:网络
I am pretty stuck right now. I have a Django project that\'s been working great until I tried to add Haystack/Whoosh for search. I\'ve had this same stack in other projects working fine.

I am pretty stuck right now. I have a Django project that's been working great until I tried to add Haystack/Whoosh for search. I've had this same stack in other projects working fine.

Whenever I have "haystack" in my settings.INSTALLED_APPS and I try manage.py runserver or manage.py shell I get 'Error: cannot import name openProc'

I thought that this might be a dependency of Haystack that didn't get installed correctly, so I removed Haystack from site-packages and reinstalled, but the same thing keeps happening. Googling openProc and related keywords has turned up nothing.

I'm hoping that someone else has run into this error, or at least that now there will be something in Google that might have an answer! I know these cannot import name <something> errors can b开发者_如何转开发e tricky, but this one has me especially stumped because it's related to an external package.


It turns out I was able to get it working by installing the latest source code using pip install git+git://github.com/toastdriven/django-haystack.git

Something was wrong with the version I got doing pip install haystack


I had wrong versions of Haystack installed. Had to:

pip uninstall haystack
pip uninstall django-haystack
pip install django-haystack


I had ran pip install haystack and got this error, then I ran pip install django-haystack problem solved!


I had this issue as well, and noticed it was because I had the old config vars in settings.py - namely HAYSTACK_SITECONF. Once it was removed, the error went away.


Installing a past version with pip install haystack==0.10 worked for me, but I think when I have time I'm going to try to migrate to Haystack 2.0.

0

精彩评论

暂无评论...
验证码 换一张
取 消