-
Notifications
You must be signed in to change notification settings - Fork 63
Unable to sync to Dropbox : Error:'ascii' codec #31
Comments
Can't reproduce this, never seen that error. Which version and operating system are you using? |
No feedback, no way to reproduce, closing this. If the original reporter or anyone else experience this, please feel free to comment to investigate this further. |
I'm getting the the same error message while trying to sync to Dropbox.
I'm on openSUSE Tumbleweed 64-bit running Symphytum 2.2 from AppImage. The only thing I can think of is a non-ASCII characters in the data entered, but I don't know how Symphytum deals with Unicode encoding. |
Thanks for the feedback. Does this happen consistently each time the auth key is entered or just randomly? I'm trying to figure out if this is a dropbox API call issue on their SDK or some other distribution (dependency) issues because the AppImage doesn't ship python but uses the one provided by the system on linux. EDIT: just tested on openSUSE TW, had no issues, so looks like it it not due to a distribution/dependecy problem. |
Consistently.
So far I've been only able to test it on openSUSE.
My Dropbox username (a gmail address) does not contain non-ASCII characters. However, my surname does ('ä'). Not sure what exactly what gets passed around through the API.
I'll dust my Windows VirtualBox image and see what happens there. |
I was able to reproduce the same issue on Windows (7, 64-bit) using Symphytum 2.2 (build 7). |
Thanks, I think it has to be the non-ascii characters in the name because once the login is successful, Symphytum checks and displays the user name as confirmation: 'Logged in as $USER'. OK, I have run some tests, really weird. First, it is really caused by the user name (name and/or surname) of the dropbox account containing non-ascii characters. But it gets weird because the same works on my current OS (Arch Linux) but fails on openSUSE TW with AppImage. Then I tried the AppImage on working systems and that fails too. The solution would be to update the bundled python packages. Thanks, your feedback was really helpful. |
After investigating a bit further, turns out this is not caused only by python deps but it is also related to python version 2.7. The AppImage, macOS and Windows dist use python 2.7 while the working installs are using python 3. Python 3 changed the default encoding format from ASCII to UTF-8. Solution: configure pyinstaller on Windows, macOS and AppImage to use python3 instead of v2.7 or drop the user name API request entirely and use another call to check for success. EDIT: trivial fix by using python's encode('utf-8') function on user name... |
Thank you jlehtoma and joshirio for this solution. I replaced my dropbox_client.py file in the Symphytum application folder with version 869b517 and the synchronization worked fine. I also confirm that if I removing any accent (eg.: é for e) on my first name and last name on my Dropbox account, that's also worked on another computer without replacing the file. |
Symphytum v2.3 with this fix, will be out soon (1 or 2 weeks). Thanks for confirming. |
When I get to sync to Dropbox for the first time I have this error after I enter the API authorization keys:
Error:'ascii' codec can't encode character u'\xe9'
in position 15: ordinal not in range(128)
Please try again.
The text was updated successfully, but these errors were encountered: