'collectstatic' command fails when WhiteNoise is enabled

The problem here is that css/iconic/open-iconic-bootstrap.css is referencing a file, open-iconic.eot, which doesn't exist in the expected location.

When you run collectstatic with that storage backend Django attempts to rewrite all the URLs in your CSS files so they reference the files by their new names e.g, css/iconic/open-iconic.8a7442ca6bed.eot. If it can't find the file it stops with that error.


I've had this error claiming a missing .css file when all my .css files existed, because I trusted Heroku documentation:

STATIC_ROOT = 'staticfiles'

over WhiteNoise documentation:

STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')

The fix is trivial, but until Heroku fix their docs (I submitted feedback), lets make sure the solution at least appears in SO.


I just had this same issue and fixed it by removing this line from my settings file,

STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'

I got this line from the Heroku documentation page...