python - 'collectstatic' command fails when WhiteNoise is enabled -
i'm trying serve static files through whitenoise per heroku's recommendation. when run collectstatic
in development environment, happens:
post-processing 'css/iconic/open-iconic-bootstrap.css' failed! traceback (most recent phone 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 homecoming 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: file 'css/fonts/open-iconic.eot' not found <whitenoise.django.gzipmanifeststaticfilesstorage object @ 0x7f57fc5b1550>.
the static collection command runs without incident when comment out line in settings:
staticfiles_storage = 'whitenoise.django.gzipmanifeststaticfilesstorage'
what's going wrong here , how prepare it? tried emptying static file output folder. runs smoothly until starts processing 1 specific file.
the problem here css/iconic/open-iconic-bootstrap.css
referencing file, open-iconic.eot
, doesn't exist in expected location.
when run collectstatic
storage backend django attempts rewrite urls in css files reference files new names e.g, css/iconic/open-iconic.8a7442ca6bed.eot
. if can't find file stops error.
python django python-3.x static-files
No comments:
Post a Comment