16

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.

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
gohnjanotis
  • 6,513
  • 6
  • 37
  • 57

5 Answers5

17

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

gohnjanotis
  • 6,513
  • 6
  • 37
  • 57
  • Also, you'll need to migrate you app to use Haystack 2.0 or development settings. There is a page in the documentation on migrating from 1.x to 2. Good luck. – Nathan Keller Nov 04 '11 at 15:53
  • this probably would have taken me forever to narrow down on my own. Thanks! – Francis Yaconiello Nov 14 '11 at 14:28
  • The something that was wrong is that you should have been pip installing `django-haystack`, not `haystack`. `pip install django-haystack` works. – GreenAsJade Dec 11 '14 at 07:15
6

I had wrong versions of Haystack installed. Had to:

pip uninstall haystack
pip uninstall django-haystack
pip install django-haystack
Brent Worden
  • 10,624
  • 7
  • 52
  • 57
manojlds
  • 290,304
  • 63
  • 469
  • 417
3

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

belteshazzar
  • 2,163
  • 2
  • 21
  • 30
1

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.

Steve
  • 2,108
  • 4
  • 25
  • 36
0

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.

Benjamin Atkin
  • 14,071
  • 7
  • 61
  • 60