-
Notifications
You must be signed in to change notification settings - Fork 90
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
UnicodeEncodeError #49
Comments
Looking into it, this certainly shouldn't happen, especially not on Py3. |
@atodorov what version do you use on production? |
we have version 1.3 in production which is the latest version |
I think this is the same issue: from what I can tell from the traceback it fails when os.path.exists/os.stat is executed. Maybe that will fail on a non UTF8 system ? |
Hrm. I poked around and had no issues with Py3.6. I had unicode in the filename and even emojis. I'll add them to the testsuite to see if its a Py3.5 issue (doubt).
Yeah, that might be it. But I dont see how I could work around that. See https://stackoverflow.com/a/10986010/1460186 |
Side note; I figured that a unicode filename wasn't properly handled by Python2.7: https://travis-ci.org/bartTC/django-attachments/jobs/386620989 so I added unicode literals. That fixes that issue, but I doubt, while looking similar, its related. Py3.5 does do that on its own already. |
According to the issue in our own project, linked above, the user has a Linux system which is fullyc configured for UTF8. However they do use Python 3.5 for that particular version since we haven't made an official release with 3.6 yet. Edit, look at kiwitcms/Kiwi#350 (comment) - they provide a file name that reproduces the issue. |
Closing this as unable to reproduce. |
@bartTC a user of ours was able to reproduce. I was also able to reproduce with a file name This is with django-attachments==1.9.1 on Python 3.8. Here are all of the ENV variables from the running container
Notably I don't see When I try attaching the same file while running my app in devel mode it works. On my computer I have LANG="en_US.UTF-8" defined of course. Could this be the issue ? |
It looks like somebody tried to upload a file with a funky name to @kiwitcms/Kiwi and we got this traceback in Sentry:
Let me know what other info I can provide because I'm not able to reproduce locally.
The text was updated successfully, but these errors were encountered: