Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango mod_wsgi and haystack = error 500
    text
    copied!<p>I'm using Haystack on my Django project and all works well using django server. When I'm going to production, running on Apache, I receive an error 500; more precisely from the log:</p> <pre><code>mod_wsgi (pid=4536): Exception occurred processing WSGI script '/opt/local/apache2/htdocs/meishi/meishi/wsgi.py'. Traceback (most recent call last): [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/core/handlers/wsgi.py", line 241, in __call__ [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] response = self.get_response(request) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/core/handlers/base.py", line 179, in get_response [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/core/handlers/base.py", line 221, in handle_uncaught_exception [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] return debug.technical_500_response(request, *exc_info) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/views/debug.py", line 66, in technical_500_response [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] html = reporter.get_traceback_html() [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/views/debug.py", line 276, in get_traceback_html [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] return t.render(c) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/template/base.py", line 140, in render [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] return self._render(context) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/template/base.py", line 134, in _render [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] return self.nodelist.render(context) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/template/base.py", line 823, in render [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] bit = self.render_node(node, context) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/template/debug.py", line 74, in render_node [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] return node.render(context) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/template/debug.py", line 84, in render [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] output = self.filter_expression.resolve(context) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/template/base.py", line 599, in resolve [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] new_obj = func(obj, *arg_vals) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/template/defaultfilters.py", line 718, in date [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] return format(value, arg) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/utils/dateformat.py", line 310, in format [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] return df.format(format_string) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/utils/dateformat.py", line 33, in format [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] pieces.append(force_unicode(getattr(self, piece)())) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/utils/dateformat.py", line 214, in r [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] return self.format('D, j M Y H:i:s O') [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/utils/dateformat.py", line 33, in format [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] pieces.append(force_unicode(getattr(self, piece)())) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/utils/encoding.py", line 71, in force_unicode [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] s = unicode(s) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/utils/functional.py", line 121, in __unicode_cast [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] return func(*self.__args, **self.__kw) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/utils/translation/__init__.py", line 86, in ugettext [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] return _trans.ugettext(message) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/utils/translation/trans_real.py", line 278, in ugettext [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] return do_translate(message, 'ugettext') [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/utils/translation/trans_real.py", line 268, in do_translate [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] _default = translation(settings.LANGUAGE_CODE) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/utils/translation/trans_real.py", line 183, in translation [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] default_translation = _fetch(settings.LANGUAGE_CODE) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/utils/translation/trans_real.py", line 160, in _fetch [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] app = import_module(appname) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File "/Applications/MAMP/htdocs/Django-1.4/django/utils/importlib.py", line 35, in import_module [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] __import__(name) [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] ImportError: No module named haystack [Wed Apr 25 13:41:52 2012] [error] [client 127.0.0.1] File does not exist: /opt/local/apache2/htdocs/favicon.ico </code></pre> <p>Before using Haystack on my project, I had no problems at all with mod_wsgi, all worked well. What could be the problem?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload