Here are the log details of the posting of an answer to a question by the same user:

/home/<username>/answers.mydomain.com/osqa/forum/views/meta.py TIME: 2011-07-22 06:09:52,712 MSG: meta.py:error_handler:200 error executing request: PATH: /questions/1/answer/ USER: UserOne (1) METHOD: POST POST PARAMETERS: text: It is not publicly available. csrfmiddlewaretoken: c7d6e1d193cfe48aa196b93a03de6ec9

    GET PARAMETERS:
    None
    HTTP HEADERS:
                    wsgi.multiprocess: True
            HTTP_REFERER: http://answers.mydomain.com/questions/1/where-can-i-download-the-latest-version
            SERVER_SOFTWARE: Apache
            SCRIPT_NAME: 
            REQUEST_METHOD: POST
            PATH_INFO: /questions/1/answer/
            HTTP_ORIGIN: http://answers.mydomain.com
            SERVER_PROTOCOL: HTTP/1.1
            QUERY_STRING: 
            CONTENT_LENGTH: 203
            HTTP_ACCEPT_CHARSET: ISO-8859-1,utf-8;q=0.7,*;q=0.3
            HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30
            HTTP_CONNECTION: keep-alive
            HTTP_COOKIE: greeting_set=True; __utma=218860559.294084869.1311284100.1311284100.1311284100.1; __utmc=218860559; __utmz=218860559.1311284100.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=http://mydomain.com/; sessionid=1df2ccb47ae9cb2eebd20a70b569532c; csrftoken=c7d6e1d193cfe48aa196b93a03de6ec9
            SERVER_NAME: answers.mydomain.com
            REMOTE_ADDR: 92.137.39.01
            wsgi.url_scheme: http
            SERVER_PORT: 80
            ds_id_18418029: 
            SERVER_ADDR: 208.97.135.01
            DOCUMENT_ROOT: /home/<username>/answers.mydomain.com/public
            HTTP_CONTENT_LENGTH: 203
            SERVER_ADMIN: webmaster@answers.mydomain.com
            SCRIPT_URI: http://answers.mydomain.com/questions/1/answer/
            wsgi.input: <socket._fileobject object at 0x253cf50>
            HTTP_HOST: answers.mydomain.com
            SCRIPT_URL: /questions/1/answer/
            wsgi.multithread: False
            HTTP_CACHE_CONTROL: max-age=0
            HTTP_CONTENT_TYPE: application/x-www-form-urlencoded
            _: _
            REQUEST_URI: /questions/1/answer/
            HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
            wsgi.version: (1, 0)
            wsgi.run_once: True
            CSRF_COOKIE: c7d6e1d193cfe48aa196b93a03de6ec9
            wsgi.errors: <open file '<stderr>', mode 'w' at 0x6c70c2518210>
            REMOTE_PORT: 53043
            HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
            GEM_HOME: /home/<username>/.gems
            CONTENT_TYPE: application/x-www-form-urlencoded
            dsid: 18418029
            HTTP_ACCEPT_ENCODING: gzip,deflate,sdch
            UNIQUE_ID: TilMcNBxh@IAAAPMFUMAAAAH
            DH_USER: <username>

COOKIES:
                    __utmz: 218860559.1311284100.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=http://mydomain.com/
            sessionid: 1df2ccb47ae9cb2eebd20a70b569532c
            csrftoken: c7d6e1d193cfe48aa196b93a03de6ec9
            __utma: 218860559.294084869.1311284100.1311284100.1311284100.1
            __utmc: 218860559
            greeting_set: True

EXCEPTION INFO:
                    Traceback (most recent call last):
              File "/home/<username>/local/lib/python2.5/site-packages/Django-1.3-py2.5.egg/django/core/handlers/base.py", line 111, in get_response
                response = callback(request, *callback_args, **callback_kwargs)
              File "/home/<username>/answers.mydomain.com/osqa/forum/modules/decorators.py", line 95, in decorated
                return decoratable(*args, **kwargs)
              File "/home/<username>/answers.mydomain.com/osqa/forum/modules/decorators.py", line 55, in __call__
                res = self._callable(*args, **kwargs)
              File "/home/<username>/answers.mydomain.com/osqa/forum/modules/decorators.py", line 30, in <lambda>
                self._callable = lambda *args, **kwargs: fn(origin, *args, **kwargs)
              File "/home/<username>/answers.mydomain.com/osqa/forum_modules/akismet/startup.py", line 70, in wrapper
                return origin(request, *args, **kwargs)
              File "/home/<username>/answers.mydomain.com/osqa/forum/views/writers.py", line 260, in answer
                'submission_url': reverse('answer', kwargs={'id': id}),
            NameError: global name 'reverse' is not defined

asked 22 Jul '11, 06:48

axonmisfire's gravatar image

axonmisfire
613
accept rate: 0%


I had the same problem in a recent update. This seems like a bug in OSQA.

I fixed it just adding this line to the header of writers.py file:

from django.core.urlresolvers import reverse
link

answered 22 Jul '11, 06:52

Oscar's gravatar image

Oscar ♦
2.1k376169
accept rate: 27%

That was the problem. Thanks!

Also, in line 263: datetime.datetime.now() should just be datetime.now()

(22 Jul '11, 07:11) axonmisfire
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:

×113
×2
×2
×1
×1

Asked: 22 Jul '11, 06:48

Seen: 321 times

Last updated: 22 Jul '11, 07:11

powered by OSQA