UnicodeDecodeError: 'ascii' codec can't decode byte

16 views
Skip to first unread message

gdx...@gmail.com

unread,
Sep 19, 2016, 2:49:45 PM9/19/16
to django-require discussion and announcements

I am using django-require 1.0.11.  I have some file names with unicode characters in them. My Linux OS has all locale/lang settings correctly to UTF8.  But collectstatic (in Django) fails as shown below.  Any ideas how to fix this, without sys.setdefaultencoding('utf8') ?

Traceback (most recent call last):
  File "manage.py", line 14, in <module>
    execute_from_command_line(sys.argv)
  File "/home/murty/domains/mezzone/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/home/murty/domains/mezzone/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/murty/domains/mezzone/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/murty/domains/mezzone/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/home/murty/domains/mezzone/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 176, in handle
    collected = self.collect()
  File "/home/murty/domains/mezzone/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 122, in collect
    for original_path, processed_path, processed in processor:
  File "/home/murty/domains/mezzone/lib/python2.7/site-packages/require/storage.py", line 142, in post_process
    build_storage_name = build_name.replace(os.sep, "/")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 24: ordinal not in range(128)

Dave Hall

unread,
Sep 26, 2016, 6:05:27 AM9/26/16
to gdx...@gmail.com, django-require discussion and announcements
Try the latest master branch. I've pushed a probably fix.

--
You received this message because you are subscribed to the Google Groups "django-require discussion and announcements" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-requir...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages