Recently, my DB on my server has shat the bed. I imagine the mistake was somewhere on my end and my wagtail database ended up being wiped clean. I've managed to get my sqlite db working again but my collectstatic is still failing.
I have tried renaming my static folder using mv static staticold and reran python manange.py collecstatic but it still fails.
The error message reads:
Post-processing 'scss/main.css' failed!
...
...
raise ValueError("The file '%s' could not be found with %r." % (filename, self))
ValueError: The file 'images/5f5a5b3515c4dd0c2c455925_110642301_938622823267359_7859124022958180678_n201.jpg' could not be found with <django.contrib.staticfiles.storage.ManifestStaticFilesStorage object at 0x7f00badf6f60>.`
I don't really care about these old images, though I would like my js and css files to be updated with collectstatic
CodePudding user response:
Are you using ManifestStaticFilesStorage? (STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'). That sounds like an error that it gives when it has a problem finding a file when collectstatic is run. You could comment out that line if it's in your settings and then try running collectstatic. You would then just have to ensure that the file it can't find is put into place or else remove the reference to it if it's not needed in order to continue using ManifestStaticFilesStorage. I encourage you to use ManifestStaticFilesStorage because it ensures that you have a unique version of your static files with every deployment. This ensures that users always receive the most recent version of a static file.
