Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1785 closed (fixed) assumes _get_lines_from_file() doesn't return None

Reported by: django@… Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: major Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


if an error occurs during view processing, has a bug such that, on occasion, debug traceback printing fails and you cannot see what your error was. Here's the traceback. Also see the attached patch for a fix that works in my development environment.

Development server is running at
Quit the server with CONTROL-C.
[06/May/2006 13:39:57] "GET /rate/1/3?dojo.transport=xmlhttp& HTTP/1.1" 301 0
Traceback (most recent call last):

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/servers/", line 272, in run

self.result = application(self.environ, self.start_response)

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/servers/", line 615, in call

return self.application(environ, start_response)

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/handlers/", line 145, in call

response = self.get_response(request.path, request)

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/handlers/", line 100, in get_response

return self.get_technical_error_response(request)

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/handlers/", line 133, in get_technical_error_response

return debug.technical_500_response(request, *sys.exc_info())

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/views/", line 100, in technical_500_response


TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
[06/May/2006 13:39:57] "GET /rate/1/3/?dojo.transport=xmlhttp HTTP/1.1" 500 1349

Attachments (1) (1.3 KB) - added by django@… 12 years ago.
patch for

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by django@…

Attachment: added

patch for

comment:1 Changed 12 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [2864]) Fixed #1785 -- debug view no longer assumes _get_lines_from_file returns None. Thanks, django@…

comment:2 Changed 12 years ago by Main

Type: defect
Note: See TracTickets for help on using tickets.
Back to Top