﻿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
21443	On PY3 if error on import, cannot show debug info	Bouke Haarsma	Bouke Haarsma	"{{{
Traceback (most recent call last):
  File ""/django/core/urlresolvers.py"", line 339, in urlconf_module
    return self._urlconf_module
AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ""/django/core/handlers/base.py"", line 101, in get_response
    resolver_match = resolver.resolve(request.path_info)
  File ""/django/core/urlresolvers.py"", line 318, in resolve
    for pattern in self.url_patterns:
  File ""/django/core/urlresolvers.py"", line 346, in url_patterns
    patterns = getattr(self.urlconf_module, ""urlpatterns"", self.urlconf_module)
  File ""/django/core/urlresolvers.py"", line 341, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "".virtualenv/python3.3/importlib/__init__.py"", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File ""<frozen importlib._bootstrap>"", line 1586, in _gcd_import
  File ""<frozen importlib._bootstrap>"", line 1567, in _find_and_load
  File ""<frozen importlib._bootstrap>"", line 1534, in _find_and_load_unlocked
  File ""<frozen importlib._bootstrap>"", line 586, in _check_name_wrapper
  File ""<frozen importlib._bootstrap>"", line 1024, in load_module
  File ""<frozen importlib._bootstrap>"", line 1005, in load_module
  File ""<frozen importlib._bootstrap>"", line 562, in module_for_loader_wrapper
  File ""<frozen importlib._bootstrap>"", line 870, in _load_module
  File ""<frozen importlib._bootstrap>"", line 313, in _call_with_frames_removed
  ...
ImportError: cannot import name urlencode

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ""/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/Versions/3.3/lib/python3.3/wsgiref/handlers.py"", line 137, in run
    self.result = application(self.environ, self.start_response)
  File ""/django/contrib/staticfiles/handlers.py"", line 67, in __call__
    return self.application(environ, start_response)
  File ""/django/core/handlers/wsgi.py"", line 206, in __call__
    response = self.get_response(request)
  File ""/django/core/handlers/base.py"", line 196, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File ""/django/core/handlers/base.py"", line 231, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File ""/django/views/debug.py"", line 69, in technical_500_response
    html = reporter.get_traceback_html()
  File ""/django/views/debug.py"", line 323, in get_traceback_html
    c = Context(self.get_traceback_data())
  File ""/django/views/debug.py"", line 281, in get_traceback_data
    frames = self.get_traceback_frames()
  File ""/django/views/debug.py"", line 428, 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 ""/django/views/debug.py"", line 379, in _get_lines_from_file
    source = loader.get_source(module_name)
  File ""<frozen importlib._bootstrap>"", line 607, in _requires_frozen_wrapper
ImportError: importlib._bootstrap is not a frozen module
}}}

There is an error in my views somewhere, which are being imported as part of my `urls.py`. The import of the urls fails, and should display an error message. However this cryptic message is shown in the terminal and I have to sift through non-relevant stack traces to get to the real problem."	Bug	closed	Python 3	1.6	Normal	fixed			Accepted	1	0	0	0	0	0
