Comment 9 for bug 913453

Revision history for this message
Emilien Klein (emilien-klein) wrote :

When running from sources (revision ) with the following file ~/Téléchargements/jd/Breaking.Bad.S05E06._.XviD-AFG.avi I get the following Exception:

Traceback (most recent call last):
  File "/home/emilien/devel/subdownloader/gui/main.py", line 1060, in onButtonDownload
    destinationPath = self.getDownloadPath(sub.getVideo(), sub)
  File "/home/emilien/devel/subdownloader/gui/main.py", line 1029, in getDownloadPath
    downloadFullPath = os.path.join(folderPath, subFileName).decode(sys.getfilesystemencoding())
  File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 15: ordinal not in range(128)

The attached patch solves this issue. The end result is that it properly downloads the subtitle file and puts it next to the video file with the following name: ~/Téléchargements/jd/Breaking.Bad.S05E06._.XviD-AFG.srt

Hope you can apply it to the main branch when releasing the next version.
I will work to get this patch applied to the Debian package, so that it can hopefully reintegrate the testing branch and be included in the upcoming Debian release.