Haystack in INSTALLED_APPS results in Error: cannot import name openProc
Asked Answered
N

5

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.

Naman answered 5/9, 2011 at 20:14 Comment(0)
N
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

Naman answered 5/9, 2011 at 20:24 Comment(3)
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.Enquire
this probably would have taken me forever to narrow down on my own. Thanks!Biddick
The something that was wrong is that you should have been pip installing django-haystack, not haystack. pip install django-haystack works.Godric
W
6

I had wrong versions of Haystack installed. Had to:

pip uninstall haystack
pip uninstall django-haystack
pip install django-haystack
Wheelsman answered 15/6, 2014 at 17:36 Comment(0)
P
3

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

Pastoralize answered 4/9, 2013 at 17:14 Comment(1)
Yeah - it's a bummer that there's a prominent-on-google how to article that shows this old way :(Godric
O
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.

Ownership answered 10/3, 2014 at 22:12 Comment(0)
C
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.

Candida answered 30/4, 2012 at 8:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.