Dear all,
I've a Pylons 0.9.7 application that works well except that sometime I
have the Exception like the subject raised by my error controller.
I've a login page where I have to put my data to enter in the
application environment. Sometimes after entered my data and pressed
Submit, the application raise the exception. If I re-enter the same
data I'm able to enter in the application. I don't know where I've to
start to investigate for this problem.
Someone can help me? Thanks in advance.
Follow the document method of the error controller.
def document(self):
"""Render the error document"""
resp = request.environ.get('pylons.original_response')
code = cgi.escape(request.GET.get('code', ''))
content = cgi.escape(request.GET.get('message', ''))
if resp:
content = literal(resp.status)
code = code or cgi.escape(str(resp.status_int))
if not code:
raise Exception('No status code was found')
c.code = code
c.message = content
return render('/error/document.mako')
This is the traceback:
File '/proarchive/pyvirt/lib/python2.4/site-packages/WebError-0.10.1-
py2.4.egg/weberror/errormiddleware.py', line 162 in __call__
app_iter = self.application(environ, sr_checker)
File '/proarchive/pyvirt/lib/python2.4/site-packages/Beaker-1.4.1-
py2.4.egg/beaker/middleware.py', line 73 in __call__
return self.app(environ, start_response)
File '/proarchive/pyvirt/lib/python2.4/site-packages/Beaker-1.4.1-
py2.4.egg/beaker/middleware.py', line 152 in __call__
return self.wrap_app(environ, session_start_response)
File '/proarchive/pyvirt/lib/python2.4/site-packages/Routes-1.10.3-
py2.4.egg/routes/middleware.py', line 130 in __call__
response = self.app(environ, start_response)
File '/proarchive/pyvirt/lib/python2.4/site-packages/Pylons-0.9.7-
py2.4.egg/pylons/wsgiapp.py', line 125 in __call__
response = self.dispatch(controller, environ, start_response)
File '/proarchive/pyvirt/lib/python2.4/site-packages/Pylons-0.9.7-
py2.4.egg/pylons/wsgiapp.py', line 324 in dispatch
return controller(environ, start_response)
File '/home/morelli/WWmr2010/wwmr2010/lib/base.py', line 61 in
__call__
return WSGIController.__call__(self, environ, start_response)
File '/proarchive/pyvirt/lib/python2.4/site-packages/Pylons-0.9.7-
py2.4.egg/pylons/controllers/core.py', line 221 in __call__
response = self._dispatch_call()
File '/proarchive/pyvirt/lib/python2.4/site-packages/Pylons-0.9.7-
py2.4.egg/pylons/controllers/core.py', line 172 in _dispatch_call
response = self._inspect_call(func)
File '/proarchive/pyvirt/lib/python2.4/site-packages/Pylons-0.9.7-
py2.4.egg/pylons/controllers/core.py', line 107 in _inspect_call
result = self._perform_call(func, args)
File '/proarchive/pyvirt/lib/python2.4/site-packages/Pylons-0.9.7-
py2.4.egg/pylons/controllers/core.py', line 60 in _perform_call
return func(**args)
File '/home/morelli/WWmr2010/wwmr2010/controllers/error.py', line 39
in document
raise Exception('No status code was found')
Exception: No status code was found
WSGI Variables
--------------
application: <beaker.middleware.CacheMiddleware object at
0xb67f780c>
beaker.cache: <beaker.cache.CacheManager object at 0xb67f782c>
beaker.get_session: <bound method SessionMiddleware._get_session of
<beaker.middleware.SessionMiddleware object at 0xb67f77ec>>
beaker.session: {'USERNAME': u'[email protected]', u'flash.text': 'You
have successfully logged in.', 'REMOTE_USER': 27, u'flash.type':
'success', '_accessed_time': 1259161469.1293731, '_creation_time':
1259161335.1993389}
paste.httpserver.thread_pool: <paste.httpserver.ThreadPool object at
0xb78c9dec>
paste.registry: <paste.registry.Registry object at 0xb1c52dcc>
paste.throw_errors: True
pylons.action_method: <bound method ErrorController.document of
<wwmr2010.controllers.error.ErrorController object at 0xb1beeccc>>
pylons.controller: <wwmr2010.controllers.error.ErrorController
object at 0xb1beeccc>
pylons.environ_config: {'session': 'beaker.session', 'cache':
'beaker.cache'}
pylons.pylons: <pylons.util.PylonsContext object at 0xb1cdd1ec>
pylons.routes_dict: {'action': u'document', 'controller': u'error',
'id': None}
routes.route: <routes.route.Route object at 0xb684dfac>
routes.url: <routes.util.URLGenerator object at 0xb1cd848c>
webob._parsed_query_vars: (MultiDict([]), '')
webob.adhoc_attrs: {'language': 'en-us'}
wsgi process: 'Multithreaded'
wsgiorg.routing_args: (<routes.util.URLGenerator object at
0xb1cd848c>, {'action': u'document', 'controller': u'error', 'id':
None})
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.