-
-
Notifications
You must be signed in to change notification settings - Fork 868
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 en/decoding issue #216
Comments
Thanks for bringing this up...a while ago :) |
Hi. Does anyone watching this issue have a traceback? I'm eager to merge in this fix but cannot seem to cause the |
Here's a case where I'm getting it. The file name contains non ascii characters.
|
@jschneier ping! |
Just experienced this issue while trying to upload an image with a Chinese filename to S3. I'm also on 2.7. |
Merged #217, will be in the next release this week. |
I'm using version When I try to upload a file from Django application, it closes the application server without any error or any message. I tried uploading from Django's shell
But it gives an error
|
I recently started testing the new s3boto3 backend, and stumbled upon some unicode/str mixups (I'm still rolling with python2.7).
I have a file field with a path containing non ASCII characters and I encountered an issue at file loading (here). After further investigation, it seems that boto3 expects each
name
argument (the one given to each resource) to be a python2 unicode/python3 str, as it goes though this method. But on django-storages side, every path/filename goes though the internal method_encode_name
, which converts to bytes in python2 (withsmart_str
, an alias forsmart_bytes
in python2). Hence myUnicodeDecodeError
.I'll open a PR soon. Any feedback welcome.
The text was updated successfully, but these errors were encountered: