5👍
Consider using boto3 instead of the older boto:
requirements.txt:
pip install django-storages
pip install boto3
settings.py:
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
- Django queryset order_by dates near today
- Django south fresh install –> error: unknown command 'schemamigration'
- How to override Django admin's views?
- Django + celery – How do I set up a crontab schedule for celery in my django app?
- What is the difference between a Multi-table inherited model and a simple One-to-one relationship between the same two models?
4👍
Had this issue recently on TravisCI with a Django repo
Running python manage.py compress
failed with the error:
Could not load Boto’s S3 bindings.
It happened to be an issue with boto trying to import google-compute-engine
module that was not installed.
One way to fix the problem is by installing GCE engine with
pip install google-compute-engine
EDIT:
After investigation, it appears that this particular problem is due to Travis being on GCE, and GCE having a default /etc/boto.cfg
file, which prompts boto to look for the GCE engine.
Another way to fix this problem on Travis without installing more dependencies is to set the default config with BOTO_CONFIG
to point to nowhere by setting the variable
BOTO_CONFIG=/tmp
in your travis.yml
See this Issue
https://github.com/boto/boto/issues/3741
- Combining multiple Django templates in a single request
- Django create superuser from batch file
- What does "Directory indexes are not allowed here." mean in a Django error?
- Coverage in parallel for django tests
- Accessing form fields as properties in a django view
1👍
in answer to your comment above, it sounds like you are using the wrong settings, check this one:
DEFAULT_FILE_STORAGE = 'storages.backends.s3.S3Storage'
0👍
For the First setting you are trying i.e :
DEFAULT_FILE_STORAGE = 'libs.storages.backends.S3Storage.S3Storage'
It means if the code for storage is present in your ‘libs.storages’ directory in your python path, then it should be accessed like above.
But if you have installed django-storages using setup.py or pip or easy_install, then following 2 options are there:
A. Amazone S3Python based library:
DEFAULT_FILE_STORAGE = 'storages.backends.s3.S3Storage'
- A simple interface between python and S3
B. Python Boto based library:
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
-
Based on python boto, and supports much advanced features e.g. connection pooling etc.
-
But you are required to install python boto for using it, e.g
pip install boto
0👍
The link in the error message, http://developer.amazonwebservices.com/connect/entry.jspa?externalID=134, seems to work now (June 2014). If you follow it and download, unpack the .zip file and put S3.py
on your Python path (i.e. in site-packages
), it all works.
- Selenium – python. how to capture network traffic's response
- Python-social-auth with Django: ImportError: No module named 'social_django'