Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

router swallows exception information #199

cjw296 opened this issue May 30, 2011 · 2 comments


None yet
2 participants
Copy link

commented May 30, 2011

I'm trying to debug some velruse auth going wrong.

The exception I see in mod_wsgi's output to Apache is:

[Mon May 30 21:30:16 2011] [error] [client] File "/home/chris/buildout-eggs/python_openid-2.2.5-py2.6.egg/openid/", line 476, in setArg, referer:
[Mon May 30 21:30:16 2011] [error] [client] assert value is not None, referer:
[Mon May 30 21:30:16 2011] [error] [client] AssertionError, referer:

So try and get an exception in a log file that's more sane, I did:

def error_view(context,request):
logger.exception('500 Error: '+request.path)
return HTTPInternalServerError(body='500 Error:\n'+format_exc())

However, the exception logged by this is:

2011-05-30 21:58:35,173 ERROR [root][MainThread] 500 Error: /velruse/yahoo/auth
Traceback (most recent call last):
File "/home/chris/buildout-eggs/pyramid-1.0-py2.6.egg/pyramid/", line 173, in call
msg = why[0]
IndexError: tuple index out of range

This is caused by this line:

...which masks the original exception.
I hit this before, and I can't remember what I did to solve it, but this is pretty annoying so opening an issue here...


This comment has been minimized.

Copy link
Member Author

commented May 30, 2011

Here's a branch that fixes this, I'm afraid I don't have the knowledge to fix the issue and keep the backwards compatibility.
However, I will note that no tests appear to fail with the code ripped out as in the branch.


This comment has been minimized.

Copy link
Member Author

commented Jun 20, 2011

I truly hope this can get solved for 1.1! :-S

@mcdonc mcdonc closed this in c724f03 Jun 21, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.