﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
13959	There is an error, when a source file with backslash-r returns is interpreted by the Python error report page.	petrvanblokland	nobody	"
There is an error, when a source file with backslash-r returns is interpreted by the Python error report page.

Due to a hard split on backslah-n, the lineno is out of range.
Also it is not clear what the name of the file is where this goes wrong.
Adding source = source.replace('\r', '\n') solves the problem, but maybe not structural enough.

Kind regards,
Petr van Blokland
buro@petr.com



 Traceback (most recent call last):

  File ""/Library/Python/2.5/site-packages/django/core/servers/basehttp.py"", line 279, in run
    self.result = application(self.environ, self.start_response)

  File ""/Library/Python/2.5/site-packages/django/core/servers/basehttp.py"", line 651, in __call__
    return self.application(environ, start_response)

  File ""/Library/Python/2.5/site-packages/django/core/handlers/wsgi.py"", line 241, in __call__
    response = self.get_response(request)

  File ""/Library/Python/2.5/site-packages/django/core/handlers/base.py"", line 137, in get_response
    return self.handle_uncaught_exception(request, resolver, exc_info)

  File ""/Library/Python/2.5/site-packages/django/core/handlers/base.py"", line 157, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)

  File ""/Library/Python/2.5/site-packages/django/views/debug.py"", line 58, in technical_500_response
    html = reporter.get_traceback_html()

  File ""/Library/Python/2.5/site-packages/django/views/debug.py"", line 109, in get_traceback_html
    frames = self.get_traceback_frames()

  File ""/Library/Python/2.5/site-packages/django/views/debug.py"", line 228, in get_traceback_frames
    pre_context_lineno, pre_context, context_line, post_context = self._get_lines_from_file(filename, lineno, 7, loader, module_name)

  File ""/Library/Python/2.5/site-packages/django/views/debug.py"", line 209, in _get_lines_from_file
    context_line = source[lineno].strip('\n')

IndexError: list index out of range"		closed	Uncategorized	1.2		duplicate			Unreviewed	0	0	0	0	0	0
