Skip to content

Fix UnicodeDecodeError #445

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

Closed
wants to merge 1 commit into from

Conversation

tatterdemalion
Copy link

If params contain non-ascii characters merging fails.

If params contain non-ascii characters merging fails.
@aaugustin
Copy link
Contributor

This pull request shifts the problem but doesn't really solve it.

If SECRET_KEY is unicode (for instance because the settings module has from __future__ import unicode_literals) the same problem will still occur.

That said, it's a valid bug.

@Fak3
Copy link

Fak3 commented Nov 13, 2013

maybe this will be better:

    params = force_text(settings.SECRET_KEY) + data['sql'].decode('ascii', 'replace') + data['params'].decode('ascii', 'replace')

@fedosov
Copy link

fedosov commented Nov 14, 2013

👍

@aaugustin aaugustin closed this in 80e94bd Nov 14, 2013
ryneeverett pushed a commit to ryneeverett/django-debug-toolbar that referenced this pull request Oct 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants