UnicodeDecode Exception #551

merged 1 commit into from Apr 3, 2014


None yet
2 participants

GomZik commented Feb 18, 2014


Request Method: GET
Request URL: http://localhost:8000/events/events/ed/

Django Version: 1.4.3
Python Version: 2.7.4

File "/home/a_homza/env/ui/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.             response = middleware_method(request, response)
    File "/home/a_homza/env/ui/local/lib/python2.7/site-packages/debug_toolbar/middleware.py" in process_response
  2.         new_response = panel.process_response(request, response)
    File "/home/a_homza/env/ui/local/lib/python2.7/site-packages/debug_toolbar/panels/sql/panel.py" in process_response
  3.             query['form'] = SQLSelectForm(auto_id=None, initial=copy(query))
    File "/home/a_homza/env/ui/local/lib/python2.7/site-packages/debug_toolbar/panels/sql/forms.py" in init
  4.         initial['hash'] = self.make_hash(initial)
    File "/home/a_homza/env/ui/local/lib/python2.7/site-packages/debug_toolbar/panels/sql/forms.py" in make_hash
  5.     items = [force_text(' '.join(item.splitlines())) for item in items]

Exception Type: UnicodeDecodeError at /events/events/ed/
Exception Value: 'ascii' codec can't decode byte 0xd0 in position 36: ordinal not in range(128)

The string that could not be encoded/decoded was: ` = '������

Update forms.py
Fix UnicodeDecodeError exception when sql params has unicode characters

@aaugustin aaugustin added the Encoding label Feb 21, 2014

aaugustin added a commit that referenced this pull request Apr 3, 2014

Merge pull request #551 from GomZik/master
Fix UnicodeDecodeError in SQL panel.

@aaugustin aaugustin merged commit 568568c into jazzband:master Apr 3, 2014

1 check passed

default The Travis CI build passed

ryneeverett pushed a commit to ryneeverett/django-debug-toolbar that referenced this pull request Oct 2, 2016

Merge pull request #551 from GomZik/master
Fix UnicodeDecodeError in SQL panel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment