Python 什么是最好的方式来通过“考试”;manage.py collectstatic”字样;在django ckeditor设置中?

Python 什么是最好的方式来通过“考试”;manage.py collectstatic”字样;在django ckeditor设置中?,python,django,ckeditor,django-staticfiles,django-ckeditor,Python,Django,Ckeditor,Django Staticfiles,Django Ckeditor,在上,设置django ckeditor的指令集包括: 4。运行collectstatic管理命令: $./manage.py collectstatic 这将把静态CKEditor require媒体资源复制到静态\u根设置给定的目录中。有关更多信息,请参阅Django关于管理静态文件的文档。 但是,当我尝试这样做时,我会得到一个错误: $ python manage.py collectstatic /usr/lib/python2.7/dist-packages/django/conf/_

在上,设置django ckeditor的指令集包括:

4。运行collectstatic管理命令:

$./manage.py collectstatic

这将把静态CKEditor require媒体资源复制到静态\u根设置给定的目录中。有关更多信息,请参阅Django关于管理静态文件的文档。

但是,当我尝试这样做时,我会得到一个错误:

$ python manage.py collectstatic
/usr/lib/python2.7/dist-packages/django/conf/__init__.py:221: DeprecationWarning: You have no filters defined on the 'mail_admins' logging handler: adding implicit debug-false-only filter. See http://docs.djangoproject.com/en/dev/releases/1.4/#request-exceptions-are-now-always-logged
  DeprecationWarning)


You have requested to collect static files at the destination
location as specified in your settings.

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 12: ordinal not in range(128)
我如何才能最好地解决问题,使django ckeditor拥有它想要的静态文件

在settings.py中,我现在有:

DIRNAME = os.path.dirname(__file__)

STATIC_ROOT = DIRNAME + '/static/'
print STATIC_ROOT
从外壳:

You are in a maze of twisted little Infocom parodies, all alike.
~/ccachicago > python manage.py collectstatic
/home/jonathan/ccachicago/static/
/home/jonathan/ccachicago/../ccachicago/static/
/usr/lib/python2.7/dist-packages/django/conf/__init__.py:221: DeprecationWarning: You have no filters defined on the 'mail_admins' logging handler: adding implicit debug-false-only filter. See http://docs.djangoproject.com/en/dev/releases/1.4/#request-exceptions-are-now-always-logged
      DeprecationWarning)


You have requested to collect static files at the destination
location as specified in your settings.

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 12: ordinal not in range(128)

You are in a maze of twisted little Infocom parodies, all alike.
~/ccachicago >
我不想说“我不能那样做”,但我在Unix上长大,在这个Ubuntu服务器上只使用传统的Unix文件名字符

我不明白为什么我会提供任何传统上不属于Unix文件名的字符,而且它似乎只报告传统的Unix文件名


是否有其他方式会被非ASCII字符绊倒?让我们假设我在Unix无法使用smartquotes、重音字符等的所有地方都只使用了ASCII字符。

看起来django项目的静态文件中有一个非ASCII文件名的路径/文件。您必须查看静态文件并找出原因。我认为无论如何都不可能真正生成静态文件列表(比如在collectstatic上使用--dry run选项),而不会导致错误

请参见:

问题是其中一个文件中的unicode数据。。。不是文件名。如票据中所述,在以下位置绕线:
使用str()更正问题并允许collectstatic完成。

谢谢;请参见问题末尾的已编辑材料。