[Fixed]-Django 1.10: django-storages on S3 error: Not naive datetime (tzinfo is already set)

1👍

UPDATE:

I’m updating my own answer, as this pull request has now been merged. To fix, simply use version 1.5.1 in your requirements.txt or pip install command:

django-storages==1.5.1

OUT OF DATE ANSWER FOR CONTEXT:

I’ve figured out a temporary fix which should lead to a permanent fix.

After some more sleuthing, a friend found this PR they thought might be related: https://github.com/jschneier/django-storages/pull/181

I noticed the date of the pull request was two days after the latest django-storages release (1.5.0) which I was running. In my requirements.txt I simply did this, pointing at the hash of the commit:

#django-storages==1.5.0
git+https://github.com/jschneier/django-storages.git#5f280571ee1ae93ee66ed805b53b08bfe5ab9f0c
boto3==1.4.0

Then, a pip install --upgrade -r requirements.txt and ran collectstatic again, and no more error! I’m guessing this fix will be included in a 1.5.1 release, at which point I’ll simply change my requirements.txt again.

Leave a comment