Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haystack in INSTALLED_APPS results in Error: cannot import name openProc

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 be tricky, but this one has me especially stumped because it's related to an external package.

like image 317
gohnjanotis Avatar asked Sep 05 '11 20:09

gohnjanotis


4 Answers

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

like image 91
gohnjanotis Avatar answered Oct 29 '22 20:10

gohnjanotis


I had wrong versions of Haystack installed. Had to:

pip uninstall haystack
pip uninstall django-haystack
pip install django-haystack
like image 24
manojlds Avatar answered Oct 29 '22 20:10

manojlds


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

like image 24
belteshazzar Avatar answered Oct 29 '22 19:10

belteshazzar


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.

like image 1
Steve Avatar answered Oct 29 '22 20:10

Steve