#22882: UnicodeDecodeError in command flush -------------------------------+-------------------- Reporter: djbaldey | Owner: nobody Type: Bug | Status: new Component: Uncategorized | Version: 1.6 Severity: Normal | Keywords: flush Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+-------------------- I use PostgreSQL in my projects. OS: GNU/Debian 7/8 on production, and Linux Mint 17 on development. DBMS returns messages as Russian text.
{{{ djbaldey@p633m project $ ../manage.py flush You have requested a flush of the database. This will IRREVERSIBLY DESTROY all data currently in the u'plx_dev' database, and return each table to the state it was in after syncdb. Are you sure you want to do this? Type 'yes' to continue, or 'no' to cancel: yes 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 242, in run_from_argv self.execute(*args, **options.__dict__) File "/home/djbaldey/env-django1.6/lib/python2.7/site- packages/django/core/management/base.py", line 285, in execute output = self.handle(*args, **options) File "/home/djbaldey/env-django1.6/lib/python2.7/site- packages/django/core/management/base.py", line 415, in handle return self.handle_noargs(**options) File "/home/djbaldey/env-django1.6/lib/python2.7/site- packages/django/core/management/commands/flush.py", line 77, in handle_noargs "The full error: %s") % (connection.settings_dict['NAME'], e) UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128) }}} Patch in django/core/management/commands/flush.py: {{{ from django.utils.encoding import smart_text ... "The full error: %s") % (connection.settings_dict['NAME'], smart_text(e)) ... }}} -- Ticket URL: <https://code.djangoproject.com/ticket/22882> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.ab9d1eecfe4644e09c0938ee6ed2566f%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.