Error “Could not load Boto's S3 bindings.”

谁都会走 提交于 2019-12-21 03:35:24

问题


I have followed the very terse guide provided for django-storages, transitioned from local file storage, and have come up against this exception:

Could not load Boto's S3 bindings.

settings.py

DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
AWS_ACCESS_KEY_ID = "xxxxxx"
AWS_SECRET_ACCESS_KEY = "xxxxxxxxx"
AWS_STORAGE_BUCKET_NAME = "images"

models.py

class CameraImage(models.Model):
...
image = models.ImageField(upload_to='images')#get_image_path)

What does that exception mean? How do I fix it?


回答1:


From looking at the source code, it appears you need to have the python-boto library installed. This is also mentioned in the documentation you link to.




回答2:


There's been an update it's now "pip install boto"



来源:https://stackoverflow.com/questions/10574834/error-could-not-load-botos-s3-bindings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!