-
-
Notifications
You must be signed in to change notification settings - Fork 867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s3boto3 backend throws exception when attempting to close file opened in read mode since V1.9 #831
Comments
Yup can you open a PR removing the assert? |
bpepple
added a commit
to Metron-Project/metron
that referenced
this issue
Feb 3, 2020
Due to this bug causing thumbnails to generate: jschneier/django-storages#831
Just released 1.9.1 to address this. Thanks for the report. |
I was having this same issue migrating my Django project to 3.0. |
Thanks for the quick fix. I was just about to open a PR to do it myself this morning but you beat me to it! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since V1.9 it is now impossible to close a file opened in read mode using s3boto3 backend.
The culprit appears to be the _create_empty_on_close() method that has been added in this version which is called when no data has been written to the file. This asserts that 'w' is contained in the mode of the file which is obviously not present when opening a file for reading.
Example:
settings.py
models.py
usage
The text was updated successfully, but these errors were encountered: