Sometimes people do not specify messages, when they're firing exceptions. In that case, one day we can get something like this in http server stdout:
File "/Users/pythonaut/.virtualenvs/dev/src/django/django/core/handlers/base.py", line 221, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/Users/pythonaut/.virtualenvs/dev/src/django/django/views/debug.py", line 66, in technical_500_response
html = reporter.get_traceback_html()
File "/Users/pythonaut/.virtualenvs/dev/src/django/django/views/debug.py", line 275, in get_traceback_html
c = Context(self.get_traceback_data())
File "/Users/pythonaut/.virtualenvs/dev/src/django/django/views/debug.py", line 231, in get_traceback_data
self.get_template_exception_info()
File "/Users/pythonaut/.virtualenvs/dev/src/django/django/views/debug.py", line 306, in get_template_exception_info
'message': self.exc_value.args[0],
IndexError: tuple index out of range
And in a browser
A server error has occurred. Please contact the administrator
Quick workaround
- Open /Users/pythonaut/.virtualenvs/dev/src/django/django/views/debug.py(use your own path from error trace) in your favourite editor
- Goto line 306, find this text
'message': self.exc_value.args[0],
- Replace it with
'message': self.exc_value.args[0] if self.exc_value.args else None,
Now you can restart http server(if it wasn't done automagically) and see detailed debug information.