You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Amazon S3 (via boto3) to store the media files for a wagtail/django project. When I try to build my site, I get a ResourceNotFound error showing that it's looking for my S3 bucket inside my local directory, rather than remotely:
fs.errors.ResourceNotFound: resource '/Users/me/Documents/Django-Project/bakery/https:/s3-region-name-here.amazonaws.com/django-project-media/media' not found
The build command does work if I copy all of my media to my local directory, but it would definitely be ideal if I did not have to do that, especially since I intend to automate the build process. I acknowledge my use case is pretty unusual, so I understand if this is more of an enhancement request than a bug.
Error log attached below (some info changed for privacy reasons).
Full Error Log
(app) xxxxxxxxxx:Django-Project $ ./manage.py build
Traceback (most recent call last):
File "/Users/me/.virtualenvs/Django-Project/lib/python3.6/site-packages/fs/osfs.py", line 324, in makedir
os.mkdir(sys_path, mode)
FileNotFoundError: [Errno 2] No such file or directory: b'/Users/me/Documents/Django-Project/bakery/https:/s3-region-name-here.amazonaws.com/django-project-media/media'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./manage.py", line 12, in <module>
execute_from_command_line(sys.argv)
File "/Users/me/.virtualenvs/Django-Project/lib/python3.6/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
utility.execute()
File "/Users/me/.virtualenvs/Django-Project/lib/python3.6/site-packages/django/core/management/__init__.py", line 365, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/me/.virtualenvs/Django-Project/lib/python3.6/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/me/.virtualenvs/Django-Project/lib/python3.6/site-packages/django/core/management/base.py", line 335, in execute
output = self.handle(*args, **options)
File "/Users/me/.virtualenvs/Django-Project/lib/python3.6/site-packages/bakery/management/commands/build.py", line 109, in handle
self.build_media()
File "/Users/me/.virtualenvs/Django-Project/lib/python3.6/site-packages/bakery/management/commands/build.py", line 223, in build_media
copy.copy_dir("osfs:///", smart_text(self.media_root), self.fs, smart_text(target_dir))
File "/Users/me/.virtualenvs/Django-Project/lib/python3.6/site-packages/fs/copy.py", line 293, in copy_dir
_dst_fs.makedir(_dst_path, recreate=True)
File "/Users/me/.virtualenvs/Django-Project/lib/python3.6/site-packages/fs/osfs.py", line 327, in makedir
raise errors.ResourceNotFound(path)
fs.errors.ResourceNotFound: resource '/Users/me/Documents/Django-Project/bakery/https:/s3-region-name-here.amazonaws.com/django-project-media/media' not found
I am using Amazon S3 (via boto3) to store the media files for a wagtail/django project. When I try to build my site, I get a
ResourceNotFound
error showing that it's looking for my S3 bucket inside my local directory, rather than remotely:fs.errors.ResourceNotFound: resource '/Users/me/Documents/Django-Project/bakery/https:/s3-region-name-here.amazonaws.com/django-project-media/media' not found
The build command does work if I copy all of my media to my local directory, but it would definitely be ideal if I did not have to do that, especially since I intend to automate the build process. I acknowledge my use case is pretty unusual, so I understand if this is more of an enhancement request than a bug.
Error log attached below (some info changed for privacy reasons).
Full Error Log
Relevant Settings
The text was updated successfully, but these errors were encountered: