Haystack conf issues

336 views
Skip to first unread message

Steve Bennett

unread,
Jan 9, 2012, 6:22:45 PM1/9/12
to tardis...@googlegroups.com
I might be doing something wrong here, or maybe there is a problem with the current settings.py?

1) Forked the new github to here: https://github.com/stevage/mytardis
2) Cloned it to a new directory
3) Copied settings_changeme to settings.py, updated a couple of things like the sqlite directory
4) Installed haystack (which I haven't done before): git cloned https://github.com/toastdriven/django-haystack/, then python setup.py install
5) ./manage.py runserver

That produced this:

Traceback (most recent call last):
  File "./manage.py", line 18, in <module>
    execute_manager(settings)
  File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 209, in execute
    translation.activate('en-us')
  File "/Library/Python/2.6/site-packages/django/utils/translation/__init__.py", line 100, in activate
    return _trans.activate(language)
  File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 202, in activate
    _active.value = translation(language)
  File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 185, in translation
    default_translation = _fetch(settings.LANGUAGE_CODE)
  File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 162, in _fetch
    app = import_module(appname)
  File "/Library/Python/2.6/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Library/Python/2.6/site-packages/haystack/__init__.py", line 23, in <module>
    raise ImproperlyConfigured('The HAYSTACK_SITECONF setting is no longer used & can be removed.')
django.core.exceptions.ImproperlyConfigured: The HAYSTACK_SITECONF setting is no longer used & can be removed.

Following its advice, I removed the HAYSTACK_SITECONF line:

Traceback (most recent call last):
  File "./manage.py", line 18, in <module>
    execute_manager(settings)
  File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 209, in execute
    translation.activate('en-us')
  File "/Library/Python/2.6/site-packages/django/utils/translation/__init__.py", line 100, in activate
    return _trans.activate(language)
  File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 202, in activate
    _active.value = translation(language)
  File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 185, in translation
    default_translation = _fetch(settings.LANGUAGE_CODE)
  File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 162, in _fetch
    app = import_module(appname)
  File "/Library/Python/2.6/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Library/Python/2.6/site-packages/haystack/__init__.py", line 25, in <module>
    raise ImproperlyConfigured('The HAYSTACK_SEARCH_ENGINE setting has been replaced with HAYSTACK_CONNECTIONS.')
django.core.exceptions.ImproperlyConfigured: The HAYSTACK_SEARCH_ENGINE setting has been replaced with HAYSTACK_CONNECTIONS.

At this point I'm wondering if I'm doing something wrong, or the settings.py is out of sync? Should I just disable haystack?

Steve

Shaun O'Keefe

unread,
Jan 9, 2012, 6:57:41 PM1/9/12
to tardis...@googlegroups.com
Hi Steve,

Just a quick sanity check: Did you run buildout before trying to install Haystack? Haystack is listed as a dependancy in the setup.py file for mytardis so it should be installed automatically when you run buildout. If it's not being installed properly, give me a shout and I'll look into it.

Cheers,
Shaun.

Steve Bennett

unread,
Jan 9, 2012, 7:18:51 PM1/9/12
to tardis...@googlegroups.com
Oops. :)

Steve Bennett

unread,
Jan 9, 2012, 7:57:40 PM1/9/12
to tardis...@googlegroups.com
6) Ok, did buildout, which ran ok. 

But ended up with the same problem - maybe the version of haystack I manually installed (2.0.0) is incompatible?

7) removed haystack (rm /Library/python/2.6/site-packages/haystack)

Now python can't find it (duh)

8) rebuild buildout, run buildout

Still no dice.

I notice that there is no reference to haystack in the buildout.cfg: https://github.com/stevage/mytardis/blob/master/buildout.cfg

Incidentally, if I comment out the reference to haystack in settings.py, then the server runs, but any page request returns the same error message:
----
ImproperlyConfigured at /


The HAYSTACK_SEARCH_ENGINE setting has been replaced with HAYSTACK_CONNECTIONS.

Request Method:GET
Request URL:http://localhost:8000/
...
----

Steve

On 10 January 2012 10:57, Shaun O'Keefe <shaun.o...@gmail.com> wrote:

Steve Bennett

unread,
Jan 9, 2012, 8:05:10 PM1/9/12
to tardis...@googlegroups.com
Replacing haystack 2.0 with 1.2.4 seems to workaround that problem. But now I have:
----
ImproperlyConfigured at /

Error loading cx_Oracle module: No module named cx_Oracle


Request Method:GET
Request URL:http://localhost:8000/
Django Version:1.3
Exception Type:ImproperlyConfigured
Exception Value:

Error loading cx_Oracle module: No module named cx_Oracle

Exception Location:/Users/stevebennett/mytardisgit/mytardis/eggs/Django-1.3-py2.6.egg/django/db/backends/oracle/base.py in <module>, line 46
Python Executable:/usr/bin/python
Python Version:2.6.1
----

I feel I might be doing something terribly wrong?

Steve

Ryan Braganza

unread,
Jan 9, 2012, 8:18:20 PM1/9/12
to tardis...@googlegroups.com
Sorry Steve,

Looks like I've stuffed up here.
If you go from HEAD^1 I suspect you'll not hit this error.

--Ryan

Steve Bennett

unread,
Jan 9, 2012, 8:47:31 PM1/9/12
to tardis...@googlegroups.com
Awesome :) Ok, I'm up and running now. For the git newbies amongst us (ie, me), I implemented Ryan's suggestion as:

git checkout -- tardis/tardis_portal/hacks.py
(to remove my own attempted fix)
git checkout HEAD^1
git branch rm-oracle-commit
(to try and placate git's dire warnings of "detached HEAD state")
git checkout rm-oracle-commit

Whew.

Steve

Shaun O'Keefe

unread,
Jan 10, 2012, 1:12:16 AM1/10/12
to tardis...@googlegroups.com
OK.

On Tue, Jan 10, 2012 at 11:57 AM, Steve Bennett <ste...@gmail.com> wrote:
6) Ok, did buildout, which ran ok. 
Cool. 

But ended up with the same problem - maybe the version of haystack I manually installed (2.0.0) is incompatible?
2.0 deprecates a bunch of stuff From 1.2. We're written for 1.2. I think pypi still serves up 1.2 which is what we've tested against. Go with 1.2.

7) removed haystack (rm /Library/python/2.6/site-packages/haystack) 

Now python can't find it (duh)

8) rebuild buildout, run buildout

Still no dice.

I notice that there is no reference to haystack in the buildout.cfg: https://github.com/stevage/mytardis/blob/master/buildout.cfg
Haystack is listed in the setup.py  dependencies. afaik buildout sorts these dependencies out for us. 

Incidentally, if I comment out the reference to haystack in settings.py, then the server runs, but any page request returns the same error message:

Haystack is imported first when the server runs, so this is just delaying the...
----
ImproperlyConfigured at /


The HAYSTACK_SEARCH_ENGINE setting has been replaced with HAYSTACK_CONNECTIONS.

That looks like you're running of a newer version of Haystack. Bollocks. I'll check whether pypi is serving up a newer version of Haystack. If so, I'll have to go through and either update to 2.0 or see if you can specify versions in setup.py...

I'll keep you posted.

Shaun.

Tim Dettrick

unread,
Jan 10, 2012, 11:46:30 PM1/10/12
to tardis...@googlegroups.com
I've got a patch pending to fix this:

There's a CI server pointing at the official master branch. I'm getting seriously tempted to have it send broken build alerts to this list:

Tim


Steve Androulakis

unread,
Jan 11, 2012, 12:35:08 AM1/11/12
to tardis...@googlegroups.com
Hi Tim,

I'll give it a look/run by end of tomorrow (Thursday). Thanks.

Also I say go for it: Re broken build emails. I don't think it'll reach spam-level, and it's incentive to keep master on the straight and narrow :)

Cheers,
Steve

Steve Bennett

unread,
Jan 11, 2012, 12:58:21 AM1/11/12
to tardis...@googlegroups.com
Is it smart enough to send them directly to the culprit?

Steve

Steve Androulakis

unread,
Jan 11, 2012, 1:16:00 AM1/11/12
to tardis...@googlegroups.com
Thanks Tim - tested and merged.

I've discovered an additional 2 bugs. One to do with the search box, which I'll create an issue for and fix myself (simple logic error).

The other appears a bit more sinister and has to do with running a south migration with a mysql database. I'll investigate tomorrow (see how far it extends.. may only affect mysql version 'x' on OS X for instance), create an issue and fix if I'm able.

Does nobody else develop with mysql? I use postgreSQL with my production instances, but I tend to switch between all of them when developing over time to catch more exotic, db-specific issues.

Cheers,
Steve

On Wed, Jan 11, 2012 at 3:46 PM, Tim Dettrick <t.det...@uq.edu.au> wrote:

Shaun O'Keefe

unread,
Jan 11, 2012, 9:44:07 PM1/11/12
to tardis...@googlegroups.com
The conversation seems to have gone in a different direction, so this is probably now be more an aside than anything, but...

Haystack is still at 1.2.6 on pypi, and running buildout in the usual fashion will get you 1.2.6 in your deployment of mytardis. I've tried this on both the trunk and the AS app. Running buildout for either will get you 1.2.6 and seems to run fine (i.e. no need to go manually installing any other versions).

Cheers,
Shaun.

Steve Bennett

unread,
Jan 11, 2012, 10:09:31 PM1/11/12
to tardis...@googlegroups.com
On 12 January 2012 13:44, Shaun O'Keefe <shaun.o...@gmail.com> wrote:
Haystack is still at 1.2.6 on pypi, and running buildout in the usual fashion will get you 1.2.6 in your deployment of mytardis. I've tried this on both the trunk and the AS app. Running buildout for either will get you 1.2.6 and seems to run fine (i.e. no need to go manually installing any other versions).


Ok, good to know. I'm still a newbie on this stuff, so it sounds like I did something  wrong at my end.

Steve 

GamesPro

unread,
Feb 23, 2018, 3:49:05 AM2/23/18
to tardis-devel


I have that same problem. and I could not find the solution, would you help me?
Reply all
Reply to author
Forward
Message has been deleted
0 new messages