Jumoke
Jumoke

Reputation: 91

whitenoise.storage.MissingFileError: The file 'ecommerce/fonts/icofont.eot

I am trying to deploy my application on Heroku. It was uploaded successfully before, however, I made some changes and I tried re-uploading but it hasn't been responding since then. I keep getting this error: whitenoise.storage.MissingFileError: The file 'ecommerce/fonts/icofont.eot' could not be found with . What can I do about this?

This is the traceback:

whitenoise.storage.MissingFileError: The file 'ecommerce/fonts/icofont.eot' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7f73c4861320>.
remote:        The CSS file 'ecommerce/css/icofont.css' references a file which could not be found:
remote:          ecommerce/fonts/icofont.eot
remote:        Please check the URL references in this CSS file, particularly any
remote:        relative paths which might be pointing to the wrong location.
remote:        Sentry is attempting to send 0 pending error messages
remote:        Waiting up to 2 seconds
remote:        Press Ctrl-C to quit

I have this in my settings.py file


STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
STATIC_URL = '/static/'

Upvotes: 9

Views: 4918

Answers (2)

yulius siregar
yulius siregar

Reputation: 31

This code was not working :

STORAGES = {
    "staticfiles": {
        "BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage", 
    },
}

and after I changed it to this :

STORAGES = {
    "staticfiles": {
        "BACKEND": "whitenoise.storage.CompressedStaticFilesStorage", 
    },
}

And now it is working.

Upvotes: 3

Isidoro
Isidoro

Reputation: 475

This comes late but I hope this will help someone who comes across the issue, at least as a temporary fix:

Using

STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage'

which disables the django caching mechanism, seems to have worked. This error was happening to me even with WHITENOISE_MANIFEST_STRICT = False

http://whitenoise.evans.io/en/stable/django.html

Upvotes: 15

Related Questions