Collectstatic fail with some files
mayait opened this issue · comments
When I try to collectstatic it fails, it seems like is trying to sync non existent files.
The folder fonts not even exist there '''plugins/bower_components/jquery-wizard-master/libs/fonts/'''
Post-processing 'plugins/bower_components/jquery-wizard-master/libs/bootstrap/bootstrap.min.css' failed!
Traceback (most recent call last):
File "./manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/home/ubuntu/apps/env/lib/python3.5/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
utility.execute()
File "/home/ubuntu/apps/env/lib/python3.5/site-packages/django/core/management/__init__.py", line 365, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/ubuntu/apps/env/lib/python3.5/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/ubuntu/apps/env/lib/python3.5/site-packages/django/core/management/base.py", line 335, in execute
output = self.handle(*args, **options)
File "/home/ubuntu/apps/env/lib/python3.5/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 189, in handle
collected = self.collect()
File "/home/ubuntu/apps/env/lib/python3.5/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 135, in collect
raise processed
File "/home/ubuntu/apps/env/lib/python3.5/site-packages/django/contrib/staticfiles/storage.py", line 296, in _post_process
content = pattern.sub(converter, content)
File "/home/ubuntu/apps/env/lib/python3.5/site-packages/django/contrib/staticfiles/storage.py", line 197, in converter
force=True, hashed_files=hashed_files,
File "/home/ubuntu/apps/env/lib/python3.5/site-packages/django/contrib/staticfiles/storage.py", line 134, in _url
hashed_name = hashed_name_func(*args)
File "/home/ubuntu/apps/env/lib/python3.5/site-packages/django/contrib/staticfiles/storage.py", line 345, in _stored_name
cache_name = self.clean_name(self.hashed_name(name))
File "/home/ubuntu/apps/env/lib/python3.5/site-packages/django/contrib/staticfiles/storage.py", line 94, in hashed_name
raise ValueError("The file '%s' could not be found with %r." % (filename, self))
ValueError: The file 'plugins/bower_components/jquery-wizard-master/libs/fonts/glyphicons-halflings-regular.eot' could not be found with <django_s3_storage.storage.ManifestStaticS3Storage object at 0x7f2e58f163c8>.
Yes, and there is no problem with django file system storage.
Finally I uploaded the files manually to the bucket and made it public.
I've seen this error too when using ManifestStaticFilesStorage
with bower packages, but without S3. The reason seems to be that ManifestStaticFilesStorage
does not like it at all if some CSS or JS file references a non-existing asset, which is what you might be seeing here.
I'm 99% sure that this issue has nothing to do with django-s3-storage.
I just had the same issue occur because of a non-existent asset