Ask Your Question

UndefinedError: 'settings' is undefined

asked 2013-03-11 00:49:18 -0500

junior123's avatar

updated 2013-03-11 00:53:00 -0500

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 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.


 [Mon Mar 11 00:37:35 2013] [error] [client] mod_wsgi (pid=26844): Exception occurred processing WSGI script '/home/ubuntu/drdoubt/django.wsgi'.
    [Mon Mar 11 00:37:35 2013] [error] [client] Traceback (most recent call last):
    [Mon Mar 11 00:37:35 2013] [error] [client]   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/", line 241, in __call__
    [Mon Mar 11 00:37:35 2013] [error] [client]     response = self.get_response(request)
    [Mon Mar 11 00:37:35 2013] [error] [client]   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/", line 179, in get_response
    [Mon Mar 11 00:37:35 2013] [error] [client]     response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
    [Mon Mar 11 00:37:35 2013] [error] [client]   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/", line 228, in handle_uncaught_exception
    [Mon Mar 11 00:37:35 2013] [error] [client]     return callback(request, **param_dict)
    [Mon Mar 11 00:37:35 2013] [error] [client]   File "/usr/local/lib/python2.7/dist-packages/django/utils/", line 91, in _wrapped_view
    [Mon Mar 11 00:37:35 2013] [error] [client]     response = view_func(request, *args, **kwargs)
    [Mon Mar 11 00:37:35 2013] [error] [client]   File "/usr/local/lib/python2.7/dist-packages/django/views/", line 33, in server_error
    [Mon Mar 11 00:37:35 2013] [error] [client]     return http.HttpResponseServerError(t.render(Context({})))
    [Mon Mar 11 00:37:35 2013] [error] [client]   File "/usr/local/lib/python2.7/dist-packages/coffin/template/", line 55, in render
    [Mon Mar 11 00:37:35 2013] [error] [client]     return super(Template, self).render(**context)
    [Mon Mar 11 00:37:35 2013] [error] [client]   File "/usr/local/lib/python2.7/dist-packages/jinja2/", line 894, in render
    [Mon Mar 11 00:37:35 2013] [error] [client]     return self.environment.handle_exception(exc_info, True)
    [Mon Mar 11 00:37:35 2013] [error] [client ...
edit retag flag offensive close merge delete


Add DEBUG=True to your What do you see then?

Evgeny's avatar Evgeny  ( 2013-03-11 19:35:36 -0500 )edit

I see the following in askbot log: (added as answer for lack of space here)

junior123's avatar junior123  ( 2013-03-12 00:35:25 -0500 )edit

it's better to add it to the question, but the key is "relation X does not exist" that means you forgot to syncdb or migrate an app - in that case called "robots".

Evgeny's avatar Evgeny  ( 2013-03-12 00:43:36 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-03-12 00:36:45 -0500

junior123's avatar
/usr/local/lib/python2.7/dist-packages/django/core/handlers/ TIME: 2013-03-12 00:33:50,722 MSG: Internal Server Error: /robots.txt

Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/", line 136, in get_response response = response.render() File "/usr/local/lib/python2.7/dist-packages/django/template/", line 104, in render self._set_content(self.rendered_content) File "/usr/local/lib/python2.7/dist-packages/django/template/", line 81, in rendered_content content = template.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/", line 140, in render return self._render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/", line 134, in _render return self.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/", line 823, in render bit = self.render_node(node, context) File "/usr/local/lib/python2.7/dist-packages/django/template/", line 837, in render_node return node.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/", line 280, in render if match: File "/usr/local/lib/python2.7/dist-packages/django/db/models/", line 130, in __nonzero__ iter(self).next() File "/usr/local/lib/python2.7/dist-packages/django/db/models/", line 118, in _result_iter self._fill_cache() File "/usr/local/lib/python2.7/dist-packages/django/db/models/", line 875, in _fill_cache self._result_cache.append( File "/usr/local/lib/python2.7/dist-packages/django/db/models/", line 291, in iterator for row in compiler.results_iter(): File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/", line 763, in results_iter for rows in self.execute_sql(MULTI): File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/", line 818, in execute_sql cursor.execute(sql, params) File "/usr/local/lib/python2.7/dist-packages/django/db/backends/", line 40, in execute return self.cursor.execute(sql, params) File "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/", line 52, in execute return self.cursor.execute(query, args) DatabaseError: relation "robots_rule" does not exist LINE 1: ...s_rule"."robot", "robots_rule"."crawl_delay" FROM "robots_ru...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-03-11 00:49:18 -0500

Seen: 328 times

Last updated: Mar 12 '13