Ask Your Question
1

Internal server error (jinja error?)

asked 2012-07-15 19:38:10 -0500

str gravatar image str
81 3 2 8

Hi community!

I had askbot running for months, but now I started getting 500 internal error. I'm stuck with the issues for days now. Please suggest if I'm missing anything (In case you recommend a re-installation, could you point me to some link which helps reinstalling askbot - keeping all my data/settings intact)

The full track-back is here,

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] mod_wsgi (pid=8580): Exception occurred processing WSGI script '/home/probaho/webapps/askbot/answers.wsgi'.

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] Traceback (most recent call last):

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] File "/home/probaho/lib/python2.6/Django-1.3.1-py2.6.egg/django/core/handlers/wsgi.py", line 272, in __call__

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] response = self.get_response(request)

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] File "/home/probaho/lib/python2.6/Django-1.3.1-py2.6.egg/django/core/handlers/base.py", line 153, in get_response

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] response = self.handle_uncaught_exception(request, resolver, sys.exc_info())

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] File "/home/probaho/lib/python2.6/Django-1.3.1-py2.6.egg/django/core/handlers/base.py", line 218, in handle_uncaught_exception

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] return callback(request, **param_dict)

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] File "/home/probaho/lib/python2.6/Django-1.3.1-py2.6.egg/django/utils/decorators.py", line 93, in _wrapped_view

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] response = view_func(request, args, *kwargs)

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] File "/home/probaho/lib/python2.6/Django-1.3.1-py2.6.egg/django/views/defaults.py", line 31, in server_error

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] return http.HttpResponseServerError(t.render(Context({})))

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] File "/home/probaho/lib/python2.6/Django-1.3.1-py2.6.egg/django/template/base.py", line 123, in render

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] return self._render(context)

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] File "/home/probaho/lib/python2.6/Django-1.3.1-py2.6.egg/django/template/base.py", line 117, in _render

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] return self.nodelist.render(context)

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] File "/home/probaho/lib/python2.6/Django-1.3.1-py2.6.egg/django/template/base.py", line 744, in render

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] bits.append(self.render_node(node, context))

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] File "/home/probaho/lib/python2.6/Django-1.3.1-py2.6.egg/django/template/base.py", line 757, in render_node

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] return node.render(context)

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] File "/home/probaho/lib/python2.6/askbot-0.7.36-py2.6.egg/askbot/templatetags/extra_tags.py", line 142, in render

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] request = self.request_var.resolve(context)

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] File "/home/probaho/lib/python2.6/Django-1.3.1-py2.6.egg/django/template/base.py", line 653, in resolve

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] value = self._resolve_lookup(context)

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] File "/home/probaho/lib/python2.6/Django-1.3.1-py2.6.egg/django/template/base.py", line 692, in _resolve_lookup

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] raise VariableDoesNotExist("Failed lookup for key [%s] in %r", (bit, current)) # missing attribute

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] VariableDoesNotExist: Failed lookup for key [request] in u'[{}]'

One important line in the trace is this one,

[Wed Jul 11 16:04:07 2012] [error] [client 127.0.0.1] File "/home/probaho/lib/python2.6/askbot-0.7.36-py2.6.egg/askbot/templatetags/extra_tags.py", line 142, in render

Those lines read this,

   136  class IncludeJinja(template.Node):
   137      """http://www.mellowmorning.com/2010/08/24/"""
   138      def __init__(self, filename, request_var):
   139          self.filename = filename
   140          self.request_var = template.Variable(request_var)
   141      def render(self, context):
   142          request = self.request_var.resolve(context)
   143          jinja_template = get_template(self.filename, request)
   144          return jinja_template.render(context)
delete close flag offensive retag edit

Comments

Even I am having same error . Can someone look into this ?

Prafulla T ( 2012-07-28 00:28:38 -0500 )edit

This http://askbot.org/en/question/7115/500-error-when-searching/ fixed my issue !

Prafulla T ( 2012-07-28 00:32:07 -0500 )edit

Be the first one to answer this question!

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-07-15 19:38:10 -0500

Seen: 70 times

Last updated: Jul 15 '12