First time here? Check out the FAQ!

Revision history  [back]

UndefinedError: 'settings' is undefined

I get this error whenever someone tries to signin to the site - using facebook, twitter or google log-ins. I have done the changes to settings.py suggested in a different thread, but did not help.

Sometimes the login works fine (even though this error is in the log) but sometimes user sees "Internal error occurred" - pls help.

Here is another observation: If i restart apache immediately after I see this error, things seem to work fine for some time, but then this problem starts again.

I have memcached installed, I dont know if that has got to do anything with this, I have confirmed that memcached is working fine, by doing the somekey someval thing.

Thanks

 [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47] mod_wsgi (pid=26844): Exception occurred processing WSGI script '/home/ubuntu/drdoubt/django.wsgi'.
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47] Traceback (most recent call last):
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 241, in __call__
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     response = self.get_response(request)
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 179, in get_response
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 228, in handle_uncaught_exception
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     return callback(request, **param_dict)
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 91, in _wrapped_view
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     response = view_func(request, *args, **kwargs)
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/django/views/defaults.py", line 33, in server_error
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     return http.HttpResponseServerError(t.render(Context({})))
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/coffin/template/__init__.py", line 55, in render
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     return super(Template, self).render(**context)
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 894, in render
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     return self.environment.handle_exception(exc_info, True)
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/askbot/templates/500.html", line 1, in top-level template code
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     {% extends "two_column_body.html" %}
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/askbot/templates/two_column_body.html", line 1, in top-level template code
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     {% extends "base.html" %}
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/askbot/templates/base.html", line 4, in top-level template code
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     <title>{% block title %}{% endblock %} - {{ settings.APP_TITLE|escape }}</title>
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 372, in getattr
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     return getattr(obj, attribute)
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47] UndefinedError: 'settings' is undefined
    [a

UndefinedError: 'settings' is undefined

I get this error whenever someone tries to signin to the site - using facebook, twitter or google log-ins. I have done the changes to settings.py suggested in a different thread, but did not help.

Sometimes the login works fine (even though this error is in the log) but sometimes user sees "Internal error occurred" - pls help.

Here is another observation: If i restart apache immediately after I see this error, things seem to work fine for some time, but then this problem starts again.

I have memcached installed, I dont know if that has got to do anything with this, I have confirmed that memcached is working fine, by doing the somekey someval thing.

Thanks

 [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47] mod_wsgi (pid=26844): Exception occurred processing WSGI script '/home/ubuntu/drdoubt/django.wsgi'.
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47] Traceback (most recent call last):
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 241, in __call__
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     response = self.get_response(request)
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 179, in get_response
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 228, in handle_uncaught_exception
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     return callback(request, **param_dict)
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 91, in _wrapped_view
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     response = view_func(request, *args, **kwargs)
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/django/views/defaults.py", line 33, in server_error
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     return http.HttpResponseServerError(t.render(Context({})))
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/coffin/template/__init__.py", line 55, in render
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     return super(Template, self).render(**context)
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 894, in render
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     return self.environment.handle_exception(exc_info, True)
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/askbot/templates/500.html", line 1, in top-level template code
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     {% extends "two_column_body.html" %}
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/askbot/templates/two_column_body.html", line 1, in top-level template code
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     {% extends "base.html" %}
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/askbot/templates/base.html", line 4, in top-level template code
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     <title>{% block title %}{% endblock %} - {{ settings.APP_TITLE|escape }}</title>
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]   File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 372, in getattr
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47]     return getattr(obj, attribute)
    [Mon Mar 11 00:37:35 2013] [error] [client 66.249.74.47] UndefinedError: 'settings' is undefined
    [a