xybu / onedrive-d-old

Microsoft OneDrive client on Linux.
http://xybu.me/projects/onedrive-d/
GNU Lesser General Public License v3.0
820 stars 143 forks source link

Unicode error #130

Closed yermak closed 9 years ago

yermak commented 9 years ago

Env: NetGear ReadyNas 104. Linux 3.0.101.RN_ARM.3, python-3.2. During sync, found following exception. Exception in thread worker2: Traceback (most recent call last): File "/usr/lib/python3.2/threading.py", line 740, in _bootstrap_inner self.run() File "/usr/local/lib/python3.2/dist-packages/onedrive_d-1.0.0dev-py3.2.egg/onedrive_d/od_worker_thread.py", line 448, in run self.sync_dir(task) File "/usr/local/lib/python3.2/dist-packages/onedrive_d-1.0.0dev-py3.2.egg/onedrive_d/od_worker_thread.py", line 167, in sync_dir self.analyze_file_path(local_path, task['remote_id'], entry, local_entries) File "/usr/local/lib/python3.2/dist-packages/onedrive_d-1.0.0dev-py3.2.egg/onedrive_d/od_worker_thread.py", line 208, in analyze_file_path is_exist = os.path.exists(local_path) File "/usr/lib/python3.2/genericpath.py", line 18, in exists os.stat(path) UnicodeEncodeError: 'ascii' codec can't encode characters in position 44-54: ordinal not in range(128)

xybu commented 9 years ago

Duplicate with #73. That post did not help solve the problem because I have no clue how to reproduce it (don't know what the file name is). It would be helpful if you can provide more information about what happened before the exception, or dig out the file name that caused the crash.

xybu commented 9 years ago

Probably this article can help: http://itekblog.com/ascii-codec-cant-encode-characters-in-position/ I'll add an exception handling so that the program won't crash.