Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#21269 closed Bug (fixed)

UnicodeDecodeError on makemessages -d djangojs

Reported by: kontakt@… Owned by: nobody
Component: Core (Management commands) Version: 1.6-beta-1
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I'm getting an UnicodeDecodeError when running makemessages -d djangojs -l de.

processing locale de
Traceback (most recent call last):
  File "/home/eike/public_html/test/env2/bin/", line 5, in <module>
  File "/home/eike/public_html/test/env2/lib/python2.7/site-packages/django/core/management/", line 397, in execute_from_command_line
  File "/home/eike/public_html/test/env2/lib/python2.7/site-packages/django/core/management/", line 390, in execute
  File "/home/eike/public_html/test/env2/lib/python2.7/site-packages/django/core/management/", line 247, in run_from_argv
    stderr.write('%s: %s' % (e.__class__.__name__, e))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xd6' in position 47: ordinal not in range(128)

I'm using Python 2.7.5 and the latest beta. I tested this with Django 1.5 too and it works without any problems.

Attachments (0)

Change History (3)

comment:1 Changed 6 months ago by claudep

  • Component changed from Translations to Core (Management commands)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

I guess the issue is due to CommandError containing non-ascii content. I'll try to prepare a fix (probably adding more unicode_literals).

comment:2 Changed 6 months ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 42a67ec1cd8cbaffd87f0a7b34714f7d4a259cfb:

Fixed #21269 -- Don't crash when CommandError contains non-ascii

Thanks kontakt@… for the report.

comment:3 Changed 6 months ago by Claude Paroz <claude@…>

In ba9cf9596bb07d30614257a755f3e4fea426d2e2:

[1.6.x] Fixed #21269 -- Don't crash when CommandError contains non-ascii

Thanks kontakt@… for the report.

Backport of 42a67ec1cd from master.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.