#29246: compilemessages management-command fails with UnicodeDecodeError
-------------------------------------+-------------------------------------
               Reporter:  Tarun      |          Owner:  nobody
  Gaba                               |
                   Type:  Bug        |         Status:  new
              Component:             |        Version:  1.9
  Uncategorized                      |       Keywords:  compilemessages
               Severity:  Normal     |  UnicodeDecodeError
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  1
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 When running compilemessages command on a django project which contains
 Unicode characters in filenames (for example in static files), it fails
 with a UnicodeError:

 {{{
 Traceback (most recent call last):
   File "manage.py", line 62, in <module>
     execute_from_command_line(sys.argv)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/__init__.py", line 364, in
 execute_from_command_line
     utility.execute()
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/__init__.py", line 356, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/base.py", line 283, in run_from_argv
     self.execute(*args, **cmd_options)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/base.py", line 330, in execute
     output = self.handle(*args, **options)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/commands/compilemessages.py", line 70, in
 handle
     for dirpath, dirnames, filenames in os.walk('.', topdown=True):
   File "/usr/lib/python2.7/os.py", line 294, in walk
     for x in walk(new_path, topdown, onerror, followlinks):
   File "/usr/lib/python2.7/os.py", line 294, in walk
     for x in walk(new_path, topdown, onerror, followlinks):
   File "/usr/lib/python2.7/os.py", line 284, in walk
     if isdir(join(top, name)):
   File "/usr/lib/python2.7/posixpath.py", line 80, in join
     path += '/' + b
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 23:
 ordinal not in range(128)
 }}}


 The 'walk' functionality in `compilemessages` was introduced in django
 `1.9`:
 
(https://github.com/django/django/blob/master/django/core/management/commands/compilemessages.py#L67)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29246>
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/049.e810b93a0c3c7f099cb01f2042fa802a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to