我正在尝试通过以下方式提供静态文件白噪声 https://github.com/evansd/whitenoise/blob/master/docs/django.rst as per Heroku https://devcenter.heroku.com/articles/django-assets的推荐。当我跑步时collectstatic
在我的开发环境中,会发生这种情况:
Post-processing 'css/iconic/open-iconic-bootstrap.css' failed!
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/Pieter/.virtualenvs/radiant/lib/python3.4/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/home/Pieter/.virtualenvs/radiant/lib/python3.4/site-packages/django/core/management/__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/Pieter/.virtualenvs/radiant/lib/python3.4/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/Pieter/.virtualenvs/radiant/lib/python3.4/site-packages/django/core/management/base.py", line 338, in execute
output = self.handle(*args, **options)
File "/home/Pieter/.virtualenvs/radiant/lib/python3.4/site-packages/django/core/management/base.py", line 533, in handle
return self.handle_noargs(**options)
File "/home/Pieter/.virtualenvs/radiant/lib/python3.4/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 168, in handle_noargs
collected = self.collect()
File "/home/Pieter/.virtualenvs/radiant/lib/python3.4/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 120, in collect
raise processed
File "/home/Pieter/.virtualenvs/radiant/lib/python3.4/site-packages/django/contrib/staticfiles/storage.py", line 242, in post_process
content = pattern.sub(converter, content)
File "/home/Pieter/.virtualenvs/radiant/lib/python3.4/site-packages/django/contrib/staticfiles/storage.py", line 181, in converter
hashed_url = self.url(unquote(joined_result), force=True)
File "/home/Pieter/.virtualenvs/radiant/lib/python3.4/site-packages/django/contrib/staticfiles/storage.py", line 128, in url
hashed_name = self.stored_name(clean_name)
File "/home/Pieter/.virtualenvs/radiant/lib/python3.4/site-packages/django/contrib/staticfiles/storage.py", line 277, in stored_name
cache_name = self.clean_name(self.hashed_name(name))
File "/home/Pieter/.virtualenvs/radiant/lib/python3.4/site-packages/django/contrib/staticfiles/storage.py", line 91, in hashed_name
(clean_name, self))
ValueError: The file 'css/fonts/open-iconic.eot' could not be found with <whitenoise.django.GzipManifestStaticFilesStorage object at 0x7f57fc5b1550>.
当我在设置中注释掉这一行时,静态收集命令运行时不会发生任何事件:
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
这里出了什么问题以及如何修复它?我已经尝试清空静态文件输出文件夹。它运行平稳,直到开始处理一个特定文件。