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

UnicodeDecodeError in Request Vars panel #9

Closed
jpvanhal opened this issue Feb 10, 2012 · 1 comment
Closed

UnicodeDecodeError in Request Vars panel #9

jpvanhal opened this issue Feb 10, 2012 · 1 comment
Assignees
Milestone

Comments

@jpvanhal
Copy link

Traceback (most recent call last):
  File "/Users/janne/Documents/Development/monitori/lib/python2.7/site-packages/flask/app.py", line 1518, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/janne/Documents/Development/monitori/monitori/middleware.py", line 17, in __call__
    return self.app(environ, start_response)
  File "/Users/janne/Documents/Development/monitori/lib/python2.7/site-packages/flask/app.py", line 1506, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/Users/janne/Documents/Development/monitori/lib/python2.7/site-packages/flask/app.py", line 1504, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/janne/Documents/Development/monitori/lib/python2.7/site-packages/flask/app.py", line 1266, in full_dispatch_request
    response = self.process_response(response)
  File "/Users/janne/Documents/Development/monitori/lib/python2.7/site-packages/flask/app.py", line 1414, in process_response
    response = handler(response)
  File "/Users/janne/Documents/Development/monitori/lib/python2.7/site-packages/flask_debugtoolbar/__init__.py", line 153, in process_response
    toolbar_html = self.debug_toolbars[real_request].render_toolbar()
  File "/Users/janne/Documents/Development/monitori/lib/python2.7/site-packages/flask_debugtoolbar/toolbar.py", line 71, in render_toolbar
    return template.render(**context)
  File "/Users/janne/Documents/Development/monitori/lib/python2.7/site-packages/jinja2/environment.py", line 894, in render
    return self.environment.handle_exception(exc_info, True)
  File "/Users/janne/Documents/Development/monitori/lib/python2.7/site-packages/flask_debugtoolbar/templates/base.html", line 47, in top-level template code
    {{ panel.content()|safe }}
  File "/Users/janne/Documents/Development/monitori/lib/python2.7/site-packages/flask_debugtoolbar/panels/request_vars.py", line 46, in content
    return self.render('panels/request_vars.html', context)
  File "/Users/janne/Documents/Development/monitori/lib/python2.7/site-packages/flask_debugtoolbar/panels/__init__.py", line 28, in render
    return template.render(**context)
  File "/Users/janne/Documents/Development/monitori/lib/python2.7/site-packages/jinja2/environment.py", line 894, in render
    return self.environment.handle_exception(exc_info, True)
  File "/Users/janne/Documents/Development/monitori/lib/python2.7/site-packages/flask_debugtoolbar/templates/panels/request_vars.html", line 71, in top-level template code
    <td>{{ value|escape }}</td>
  File "/Users/janne/Documents/Development/monitori/lib/python2.7/site-packages/jinja2/_markupsafe/_native.py", line 21, in escape
    return Markup(unicode(s)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position 1: ordinal not in range(128)

The value of s here is 'n\xf6R\x8dJ\xd4\x03fA] w\xdf{\x85\x03'

@ghost ghost assigned mgood Feb 15, 2012
@mgood
Copy link
Contributor

mgood commented Feb 15, 2012

The sessions panel assumes that the session values are all strings and just tries to print them out. I'll make it do something sensible if there are values that aren't printable.

@mgood mgood closed this as completed in a48efe8 Feb 15, 2012
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants