3
2

Hi, I found the following error when I typed my domain after completing the installation.

Server Error

URL: http://www.mysite.com/
Module paste.exceptions.errormiddleware:144 in __call__
>>  app_iter = self.application(environ, sr_checker)
Module django.core.handlers.wsgi:241 in __call__
>>  response = self.get_response(request)
Module django.core.handlers.base:142 in get_response
>>  return self.handle_uncaught_exception(request, resolver, exc_info)
Module django.core.handlers.base:181 in handle_uncaught_exception
>>  return callback(request, **param_dict)
Module forum.views.meta:201 in error_handler
>>  return HttpResponseIntServerError(request)
Module forum.http_responses:39 in __init__
>>  content=render_to_string('500.html', context_instance=RequestContext(request)),
Module django.template.loader:186 in render_to_string
>>  return t.render(context_instance)
Module django.template:173 in render
>>  return self._render(context)
Module django.template:167 in _render
>>  return self.nodelist.render(context)
Module django.template:796 in render
>>  bits.append(self.render_node(node, context))
Module django.template:809 in render_node
>>  return node.render(context)
Module django.template.loader_tags:125 in render
>>  return compiled_parent._render(context)
Module django.template:167 in _render
>>  return self.nodelist.render(context)
Module django.template:796 in render
>>  bits.append(self.render_node(node, context))
Module django.template:809 in render_node
>>  return node.render(context)
Module django.template.loader_tags:139 in render
>>  return self.template.render(context)
Module django.template:173 in render
>>  return self._render(context)
Module django.template:167 in _render
>>  return self.nodelist.render(context)
Module django.template:796 in render
>>  bits.append(self.render_node(node, context))
Module django.template:809 in render_node
>>  return node.render(context)
Module django.template.defaulttags:41 in render
>>  if csrf_token:
Module django.utils.functional:197 in __wrapper__
>>  raise TypeError("Lazy object returned unexpected type.")
TypeError: Lazy object returned unexpected type.

extra data
full traceback
text version

Please help. I am lost.

asked 21 May '11, 03:01

subrat's gravatar image

subrat
60579
accept rate: 0%

edited 21 May '11, 04:00

Andrew_S's gravatar image

Andrew_S ♦
5.6k45674

I have the same problem, also with dreamhost. Did you manage to solve it? Thanks in advance.

(01 Jun '11, 17:04) quimey

I’m stuck on this problem as well. This is on my own development server. Django 1.2.1 running on Python 2.6.5.

(30 Jun '11, 23:33) Kevin Yank

I had the same error (error log) on Dreamhost using Django 1.2.1. I talked to Hernani on IRC, and he recommended upgrading Django to 1.3. Upgrading solved this problem. Seems like OSQA doesn't work with Django 1.2 anymore.

export PATH=~/local/bin:$PATH
easy_install -U django

Also set DJANGO_VERSION = 1.3 in your settings_local.py

link

answered 18 Jul '11, 13:37

krst's gravatar image

krst
33085
accept rate: 33%

To Rick and Hernani, Please help. I tried to pull out django.osqa.log file and it shows the following.

/home/username/mypage.com/osqa/forum/views/meta.py TIME: 2011-05-22 01:57:42,675 MSG: meta.py:error_handler:200

    error executing request:
    PATH: /
    USER: <anonymous>
    METHOD: GET
    POST PARAMETERS:
    None
    GET PARAMETERS:
    None
    HTTP HEADERS:
            wsgi.multiprocess: True
    HTTP_COOKIE: sessionid=660a2e5a98141bf2a793284b77ebb790; csrftoken=c2a0809d22a85b221dd2349c5e4cf30a
    SERVER_SOFTWARE: Apache
    SCRIPT_NAME: 
    HTTP_IF_MODIFIED_SINCE: Sat, 21 May 2011 06:29:16 GMT
    REQUEST_METHOD: GET
    PATH_INFO: /
    SERVER_PROTOCOL: HTTP/1.1
    QUERY_STRING: 
    paste.throw_errors: True
    HTTP_ACCEPT_CHARSET: ISO-8859-1,utf-8;q=0.7,*;q=0.3
    HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24
    HTTP_CONNECTION: keep-alive
    SERVER_NAME: www.mypage.com
    REMOTE_ADDR: 72.66.232.241
    ds_id_17940056: 
    HTTP_IF_NONE_MATCH: "2bac480-971-4a3c35b816700"
    wsgi.url_scheme: http
    SERVER_PORT: 80
    SERVER_ADDR: 173.236.233.171
    DOCUMENT_ROOT: /home/username/mypage.com/public
    SERVER_ADMIN: webmaster@mypage.com
    SCRIPT_URI: http://www.mypage.com/
    wsgi.input: <socket._fileobject object at 0x23d3e60>
    HTTP_HOST: www.mypage.com
    SCRIPT_URL: /
    wsgi.multithread: False
    HTTP_CACHE_CONTROL: max-age=0
    _: _
    REQUEST_URI: /
    HTTP_ACCEPT: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    CSRF_COOKIE_USED: True
    wsgi.version: (1, 0)
    wsgi.run_once: True
    CSRF_COOKIE: c2a0809d22a85b221dd2349c5e4cf30a
    wsgi.errors: <open file '<stderr>', mode 'w' at 0x2af22733210>
    REMOTE_PORT: 50586
    HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
    GEM_HOME: /home/username/.gems
    dsid: 17940056
    HTTP_ACCEPT_ENCODING: gzip,deflate,sdch
    UNIQUE_ID: Tdil1q3s6nQAAAX1OMcAAAAE
    DH_USER: username

COOKIES:
            csrftoken: c2a0809d22a85b221dd2349c5e4cf30a
    sessionid: 660a2e5a98141bf2a793284b77ebb790

EXCEPTION INFO:
            Traceback (most recent call last):
      File "/var/lib/python-support/python2.5/django/core/handlers/base.py", line 100, in get_response
        response = callback(request, *callback_args, **callback_kwargs)
      File "/home/username/mypage.com/osqa/forum/modules/decorators.py", line 95, in decorated
        return decoratable(*args, **kwargs)
      File "/home/username/mypage.com/osqa/forum/modules/decorators.py", line 60, in __call__
        res = dec(res, *args, **kwargs)
      File "/home/username/mypage.com/osqa/forum/views/decorators.py", line 32, in decorated
        context_instance=RequestContext(request))
      File "/var/lib/python-support/python2.5/django/shortcuts/__init__.py", line 20, in render_to_response
        return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
      File "/var/lib/python-support/python2.5/django/template/loader.py", line 186, in render_to_string
        return t.render(context_instance)
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 173, in render
        return self._render(context)
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 167, in _render
        return self.nodelist.render(context)
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 796, in render
        bits.append(self.render_node(node, context))
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 809, in render_node
        return node.render(context)
      File "/var/lib/python-support/python2.5/django/template/loader_tags.py", line 125, in render
        return compiled_parent._render(context)
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 167, in _render
        return self.nodelist.render(context)
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 796, in render
        bits.append(self.render_node(node, context))
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 809, in render_node
        return node.render(context)
      File "/var/lib/python-support/python2.5/django/template/loader_tags.py", line 125, in render
        return compiled_parent._render(context)
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 167, in _render
        return self.nodelist.render(context)
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 796, in render
        bits.append(self.render_node(node, context))
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 809, in render_node
        return node.render(context)
      File "/var/lib/python-support/python2.5/django/template/loader_tags.py", line 125, in render
        return compiled_parent._render(context)
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 167, in _render
        return self.nodelist.render(context)
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 796, in render
        bits.append(self.render_node(node, context))
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 809, in render_node
        return node.render(context)
      File "/var/lib/python-support/python2.5/django/template/loader_tags.py", line 139, in render
        return self.template.render(context)
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 173, in render
        return self._render(context)
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 167, in _render
        return self.nodelist.render(context)
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 796, in render
        bits.append(self.render_node(node, context))
      File "/var/lib/python-support/python2.5/django/template/__init__.py", line 809, in render_node
        return node.render(context)
      File "/var/lib/python-support/python2.5/django/template/defaulttags.py", line 41, in render
        if csrf_token:
      File "/var/lib/python-support/python2.5/django/utils/functional.py", line 197, in __wrapper__
        raise TypeError("Lazy object returned unexpected type.")
    TypeError: Lazy object returned unexpected type.

/home/username/mypage.com/osqa/forum/views/meta.py TIME: 2011-05-22 01:57:59,981 MSG: meta.py:error_handler:200

    error executing request:
    PATH: /
    USER: <anonymous>
    METHOD: GET
    POST PARAMETERS:
    None
    GET PARAMETERS:
    None
    HTTP HEADERS:
            wsgi.multiprocess: True
    HTTP_COOKIE: sessionid=660a2e5a98141bf2a793284b77ebb790; csrftoken=c2a0809d22a85b221dd2349c5e4cf30a
    SERVER_SOFTWARE: Apache
    SCRIPT_NAME: 
    REQUEST_METHOD: GET
    PATH_INFO: /
    SERVER_PROTOCOL: HTTP/1.1
    QUERY_STRING: 
    paste.throw_errors: True
    HTTP_ACCEPT_CHARSET: ISO-8859-1,utf-8;q=0.7,*;q=0.3
    HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24
    HTTP_CONNECTION: keep-alive
    SERVER_NAME: www.mypage.com
    REMOTE_ADDR: 72.66.232.241
    ds_id_17940056: 
    wsgi.url_scheme: http
    SERVER_PORT: 80
    SERVER_ADDR: 173.236.233.171
    DOCUMENT_ROOT: /home/username/mypage.com/public
    SERVER_ADMIN: webmaster@mypage.com
    SCRIPT_URI: http://www.mypage.com/
    wsgi.input: <socket._fileobject object at 0x23cbb18>
    HTTP_HOST: www.mypage.com
    SCRIPT_URL: /
    wsgi.multithread: False
    HTTP_CACHE_CONTROL: max-age=0
    _: _
    REQUEST_URI: /
    HTTP_ACCEPT: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    CSRF_COOKIE_USED: True
    wsgi.version: (1, 0)
    wsgi.run_once: True
    CSRF_COOKIE: c2a0809d22a85b221dd2349c5e4cf30a
    wsgi.errors: <open file '<stderr>', mode 'w' at 0x2af22733210>
    REMOTE_PORT: 50589
    HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
    GEM_HOME: /home/username/.gems
    dsid: 17940056
    HTTP_ACCEPT_ENCODING: gzip,deflate,sdch
    UNIQUE_ID: Tdil563s6nQAAAX2OSwAAAAA
    DH_USER: username

COOKIES:
        csrftoken: c2a0809d22a85b221dd2349c5e4cf30a
sessionid: 660a2e5a98141bf2a793284b77ebb790

EXCEPTION INFO:
        Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/username/mypage.com/osqa/forum/modules/decorators.py", line 95, in decorated
    return decoratable(*args, **kwargs)
  File "/home/username/mypage.com/osqa/forum/modules/decorators.py", line 60, in __call__
    res = dec(res, *args, **kwargs)
  File "/home/username/mypage.com/osqa/forum/views/decorators.py", line 32, in decorated
    context_instance=RequestContext(request))
  File "/var/lib/python-support/python2.5/django/shortcuts/__init__.py", line 20, in render_to_response
    return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
  File "/var/lib/python-support/python2.5/django/template/loader.py", line 186, in render_to_string
    return t.render(context_instance)
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 173, in render
    return self._render(context)
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 167, in _render
    return self.nodelist.render(context)
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 796, in render
    bits.append(self.render_node(node, context))
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 809, in render_node
    return node.render(context)
  File "/var/lib/python-support/python2.5/django/template/loader_tags.py", line 125, in render
    return compiled_parent._render(context)
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 167, in _render
    return self.nodelist.render(context)
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 796, in render
    bits.append(self.render_node(node, context))
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 809, in render_node
    return node.render(context)
  File "/var/lib/python-support/python2.5/django/template/loader_tags.py", line 125, in render
    return compiled_parent._render(context)
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 167, in _render
    return self.nodelist.render(context)
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 796, in render
    bits.append(self.render_node(node, context))
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 809, in render_node
    return node.render(context)
  File "/var/lib/python-support/python2.5/django/template/loader_tags.py", line 125, in render
    return compiled_parent._render(context)
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 167, in _render
    return self.nodelist.render(context)
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 796, in render
    bits.append(self.render_node(node, context))
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 809, in render_node
    return node.render(context)
  File "/var/lib/python-support/python2.5/django/template/loader_tags.py", line 139, in render
    return self.template.render(context)
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 173, in render
    return self._render(context)
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 167, in _render
    return self.nodelist.render(context)
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 796, in render
    bits.append(self.render_node(node, context))
  File "/var/lib/python-support/python2.5/django/template/__init__.py", line 809, in render_node
    return node.render(context)
  File "/var/lib/python-support/python2.5/django/template/defaulttags.py", line 41, in render
    if csrf_token:
  File "/var/lib/python-support/python2.5/django/utils/functional.py", line 197, in __wrapper__
    raise TypeError("Lazy object returned unexpected type.")
TypeError: Lazy object returned unexpected type.

link

answered 22 May '11, 02:03

subrat's gravatar image

subrat
60579
accept rate: 0%

edited 22 May '11, 03:52

Andrew_S's gravatar image

Andrew_S ♦
5.6k45674

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×156
×12
×6

Asked: 21 May '11, 03:01

Seen: 638 times

Last updated: 18 Jul '11, 13:37

powered by OSQA