Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error in namespace violation(?) #19

Closed
cogat opened this issue Nov 29, 2016 · 1 comment
Closed

Misleading error in namespace violation(?) #19

cogat opened this issue Nov 29, 2016 · 1 comment

Comments

@cogat
Copy link

cogat commented Nov 29, 2016

See ic-labs/django-icekit#162

I assume to reproduce the error, one would override a template that extends from a template in a different app namespace.

The error can't be rendered by the technical 500 view (see stacktrace below), and shows up as a TemplateDoesNotExist: icekit_plugins_file:icekit/plugins/contact_person/default.html in an error log.

A more friendly error than 'TemplateDoesNotExist' would be helpful, but I'm not sure enough about what's going on to be able to suggest one.

  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/Users/gturner/Sites/acmi/var/go.sh-venv/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 63, in __call__
    return self.application(environ, start_response)
  File "/Users/gturner/Sites/acmi/var/go.sh-venv/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 189, in __call__
    response = self.get_response(request)
  File "/Users/gturner/Sites/acmi/var/go.sh-venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 218, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/Users/gturner/Sites/acmi/var/go.sh-venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 261, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "/Users/gturner/Sites/acmi/var/go.sh-venv/lib/python2.7/site-packages/django/views/debug.py", line 97, in technical_500_response
    html = reporter.get_traceback_html()
  File "/Users/gturner/Sites/acmi/var/go.sh-venv/lib/python2.7/site-packages/django/views/debug.py", line 383, in get_traceback_html
    c = Context(self.get_traceback_data(), use_l10n=False)
  File "/Users/gturner/Sites/acmi/var/go.sh-venv/lib/python2.7/site-packages/django/views/debug.py", line 313, in get_traceback_data
    } for t in source_list_func(str(self.exc_value))]
  File "/Users/gturner/Sites/acmi/var/go.sh-venv/lib/python2.7/site-packages/django/views/debug.py", line 270, in format_path_status
    if not os.path.exists(path):
  File "/Users/gturner/Sites/acmi/var/go.sh-venv/bin/../lib/python2.7/genericpath.py", line 18, in exists
    os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NamespaceOrigin found```
@cogat cogat changed the title Misleading error in namespace violation Misleading error in namespace violation(?) Nov 29, 2016
@Fantomas42
Copy link
Owner

Hello,

the traceback says that it's django itself that raise this error, so I don't see how to make this error sounding more friendly...

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants