#22882: UnicodeDecodeError in command flush
-------------------------------+------------------------------------
Reporter: djbaldey | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.6
Severity: Normal | Resolution:
Keywords: flush | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Comment (by djbaldey):
UPD: in command dumpdata
{{{
djbaldey@p633m project $ ../manage.py dumpdata users
[Traceback (most recent call last):
File "../manage.py", line 60, in <module>
execute_from_command_line(sys.argv)
File "/home/djbaldey/env-django1.6/lib/python2.7/site-
packages/django/core/management/__init__.py", line 399, in
execute_from_command_line
utility.execute()
File "/home/djbaldey/env-django1.6/lib/python2.7/site-
packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/djbaldey/env-django1.6/lib/python2.7/site-
packages/django/core/management/base.py", line 249, in run_from_argv
stderr.write('%s: %s' % (e.__class__.__name__, force_str(e)))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 30:
ordinal not in range(128)
}}}
Patch in django/core/management/commands/base.py:
{{{
from django.utils.encoding import force_str, smart_text
...
stderr.write('%s: %s' % (e.__class__.__name__, smart_text(e)))
...
}}}
After:
{{{
djbaldey@p633m project $ ../manage.py dumpdata users
CommandError: Unable to serialize database: ОШИБКА: отношение
"users_permission" не существует
LINE 1: ...."built_type", "users_permission"."codename" FROM "users_per...
^
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22882#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.9ef684ffa1e5a6ebca8c431bcbf7efc7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.