putio-sync icon indicating copy to clipboard operation
putio-sync copied to clipboard

Unicode issue with python2

Open alasdaircr opened this issue 7 years ago • 2 comments

When running under python2.7 you crash when encountering a filename with a unicode symbol in it.

Exception in thread DownloadManager:                | ETA:  --:--:--   0.00 B/s
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/putiosync/download_manager.py", line 224, in run
    success = download.perform_download(self._token)
  File "/usr/local/lib/python2.7/dist-packages/putiosync/download_manager.py", line 101, in perform_download
    download_path = "{}.part".format(final_path)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0301' in position 112: ordinal not in range(128)

alasdaircr avatar Feb 26 '17 22:02 alasdaircr

I created a pull request which fixes this issue. #47

mihaerzen avatar Sep 01 '17 07:09 mihaerzen

Was this issue released to the version on PIP? I seem to still be getting this error.

joshkerr avatar Sep 19 '18 19:09 joshkerr