#30983 closed Bug (duplicate)
Exception traceback fails due to subsequent exceptions when using the Jinja template backend and Jinja>=2.10.2
| Reported by: | Barak Shohat | Owned by: | nobody |
|---|---|---|---|
| Component: | Template system | Version: | 2.2 |
| Severity: | Normal | Keywords: | |
| Cc: | Barak Shohat | Triage Stage: | Unreviewed |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Jinja 2.10.2 introduces a new traceback system per their release docs:
Version 2.10.2 Released 2019-10-04
- Use Python 3.7’s better traceback support to avoid a core dump when using debug builds of Python 3.7.
This appears to cause source code lines to be incorrectly reported in some template tracebacks, causing errors like the following:
SAMPLE TEMPLATE:
{% extends 'accounts/base.html' %}
{% block accounts_content %}
{% block password_reset %}
<form method="post">
{{ block.super }} {# ERROR IS HERE - `block` is not defined #}
{{ crispy(form) }}
<input class="btn btn-primary" type="submit" name="submit" value="Reset Password">
</form>
{% endblock %}
{% endblock %}
WEB SERVER TRACEBACK:
Traceback (most recent call last):
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\base.py", line 145, in _get_response
response = self.process_exception_by_middleware(e, request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\base.py", line 143, in _get_response
response = response.render()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\template\response.py", line 106, in render
self.content = self.rendered_content
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\template\response.py", line 83, in rendered_content
content = template.render(context, self._request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\template\backends\jinja2.py", line 71, in render
return self.template.render(context)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\jinja2\asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\jinja2\environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\jinja2\environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\jinja2\_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "D:\PROJECTS\DEVEL\hst\hstprod\hstprod\apps\accounts\jinja2\accounts\password_reset_form.html", line 1, in top-level template code
{% extends 'accounts/base.html' %}
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\jinja2\environment.py", line 1005, in render
return concat(self.root_render_func(self.new_context(vars)))
File "D:\PROJECTS\DEVEL\hst\hstprod\hstprod\apps\accounts\jinja2\accounts\password_reset_form.html", line 14, in root
File "D:\PROJECTS\DEVEL\hst\hstprod\hstprod\apps\accounts\jinja2\accounts\base.html", line 14, in root
File "D:\PROJECTS\DEVEL\hst\hstprod\hstprod\jinja2\base.html", line 13, in root
<meta name="description" content="{{ request.meta.description|default('') }}"/>
File "D:\PROJECTS\DEVEL\hst\hstprod\hstprod\jinja2\base.html", line 92, in block_body
File "D:\PROJECTS\DEVEL\hst\hstprod\hstprod\jinja2\base.html", line 105, in block_page_surface
File "D:\PROJECTS\DEVEL\hst\hstprod\hstprod\jinja2\base.html", line 142, in block_mainpage
File "D:\PROJECTS\DEVEL\hst\hstprod\hstprod\jinja2\base.html", line 167, in block_maincontent
File "D:\PROJECTS\DEVEL\hst\hstprod\hstprod\apps\accounts\jinja2\accounts\base.html", line 22, in block_content
File "D:\PROJECTS\DEVEL\hst\hstprod\hstprod\apps\accounts\jinja2\accounts\password_reset_form.html", line 22, in block_accounts_content
File "D:\PROJECTS\DEVEL\hst\hstprod\hstprod\apps\accounts\jinja2\accounts\password_reset_form.html", line 34, in block_password_reset
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\jinja2\environment.py", line 430, in getattr
return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'block' is undefined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\utils\deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 36, in inner
response = response_for_exception(request, exc)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 90, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 125, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 94, in technical_500_response
html = reporter.get_traceback_html()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 333, in get_traceback_html
c = Context(self.get_traceback_data(), use_l10n=False)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 264, in get_traceback_data
frames = self.get_traceback_frames()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 426, in get_traceback_frames
filename, lineno, 7, loader, module_name,
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 387, in _get_lines_from_file
context_line = source[lineno]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\utils\deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 36, in inner
response = response_for_exception(request, exc)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 90, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 125, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 94, in technical_500_response
html = reporter.get_traceback_html()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 333, in get_traceback_html
c = Context(self.get_traceback_data(), use_l10n=False)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 264, in get_traceback_data
frames = self.get_traceback_frames()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 426, in get_traceback_frames
filename, lineno, 7, loader, module_name,
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 387, in _get_lines_from_file
context_line = source[lineno]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\utils\deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 36, in inner
response = response_for_exception(request, exc)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 90, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 125, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 94, in technical_500_response
html = reporter.get_traceback_html()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 333, in get_traceback_html
c = Context(self.get_traceback_data(), use_l10n=False)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 264, in get_traceback_data
frames = self.get_traceback_frames()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 426, in get_traceback_frames
filename, lineno, 7, loader, module_name,
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 387, in _get_lines_from_file
context_line = source[lineno]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\utils\deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 36, in inner
response = response_for_exception(request, exc)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 90, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 125, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 94, in technical_500_response
html = reporter.get_traceback_html()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 333, in get_traceback_html
c = Context(self.get_traceback_data(), use_l10n=False)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 264, in get_traceback_data
frames = self.get_traceback_frames()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 426, in get_traceback_frames
filename, lineno, 7, loader, module_name,
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 387, in _get_lines_from_file
context_line = source[lineno]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\utils\deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 36, in inner
response = response_for_exception(request, exc)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 90, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 125, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 94, in technical_500_response
html = reporter.get_traceback_html()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 333, in get_traceback_html
c = Context(self.get_traceback_data(), use_l10n=False)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 264, in get_traceback_data
frames = self.get_traceback_frames()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 426, in get_traceback_frames
filename, lineno, 7, loader, module_name,
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 387, in _get_lines_from_file
context_line = source[lineno]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\utils\deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 36, in inner
response = response_for_exception(request, exc)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 90, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 125, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 94, in technical_500_response
html = reporter.get_traceback_html()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 333, in get_traceback_html
c = Context(self.get_traceback_data(), use_l10n=False)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 264, in get_traceback_data
frames = self.get_traceback_frames()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 426, in get_traceback_frames
filename, lineno, 7, loader, module_name,
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 387, in _get_lines_from_file
context_line = source[lineno]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\utils\deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 36, in inner
response = response_for_exception(request, exc)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 90, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 125, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 94, in technical_500_response
html = reporter.get_traceback_html()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 333, in get_traceback_html
c = Context(self.get_traceback_data(), use_l10n=False)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 264, in get_traceback_data
frames = self.get_traceback_frames()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 426, in get_traceback_frames
filename, lineno, 7, loader, module_name,
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 387, in _get_lines_from_file
context_line = source[lineno]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\repo_libs\dwtools3\dwtools3\django\helpers\middleware.py", line 64, in __call__
response = self.get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 36, in inner
response = response_for_exception(request, exc)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 90, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 125, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 94, in technical_500_response
html = reporter.get_traceback_html()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 333, in get_traceback_html
c = Context(self.get_traceback_data(), use_l10n=False)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 264, in get_traceback_data
frames = self.get_traceback_frames()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 426, in get_traceback_frames
filename, lineno, 7, loader, module_name,
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 387, in _get_lines_from_file
context_line = source[lineno]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\webmake\django\middleware.py", line 52, in __call__
return self.get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 36, in inner
response = response_for_exception(request, exc)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 90, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 125, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 94, in technical_500_response
html = reporter.get_traceback_html()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 333, in get_traceback_html
c = Context(self.get_traceback_data(), use_l10n=False)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 264, in get_traceback_data
frames = self.get_traceback_frames()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 426, in get_traceback_frames
filename, lineno, 7, loader, module_name,
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 387, in _get_lines_from_file
context_line = source[lineno]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "d:\programs\Python\CleanInstall\Python37\lib\wsgiref\handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\contrib\staticfiles\handlers.py", line 65, in __call__
return self.application(environ, start_response)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\wsgi.py", line 141, in __call__
response = self.get_response(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\base.py", line 75, in get_response
response = self._middleware_chain(request)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 36, in inner
response = response_for_exception(request, exc)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 90, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\core\handlers\exception.py", line 125, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 94, in technical_500_response
html = reporter.get_traceback_html()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 333, in get_traceback_html
c = Context(self.get_traceback_data(), use_l10n=False)
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 264, in get_traceback_data
frames = self.get_traceback_frames()
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 426, in get_traceback_frames
filename, lineno, 7, loader, module_name,
File "D:\PROJECTS\DEVEL\hst\hstprod\venv\lib\site-packages\django\views\debug.py", line 387, in _get_lines_from_file
context_line = source[lineno]
IndexError: list index out of range
[13/Nov/2019 17:59:39] "GET /reset-password/ HTTP/1.1" 500 59
The problem occurs because lineno is larger than the number of lines in the source file detected.
Change History (3)
comment:1 by , 6 years ago
| Cc: | added |
|---|---|
| Component: | Uncategorized → Template system |
| Type: | Uncategorized → Bug |
comment:2 by , 6 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
comment:3 by , 6 years ago
Agreed, the patch on that PR will resolve the cascading exceptions. Though not clear where the incorrect line number info is coming from.
Note:
See TracTickets
for help on using tickets.
I think this is a duplicate of #30405 based on this comment.