subdownloader encode error, unable to download subtitle

Bug #808154 reported by Titien
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
SubDownloader
Confirmed
Undecided
Unassigned
subdownloader (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When I try to download any subtitle with Subdownloader I've got this error :

Traceback (most recent call last):
  File "/usr/share/subdownloader/gui/main.py", line 1043, in onButtonDownload
    destinationPath = self.getDownloadPath(sub.getVideo(), sub)
  File "/usr/share/subdownloader/gui/main.py", line 1012, in getDownloadPath
    downloadFullPath = os.path.join(folderPath, subFileName).decode('utf8')
  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 14: ordinal not in range(128)

I looked for any parameters which could change the encoding but I didn't fin anything.
I do not have any problem to send subtitles.

My OS is Ubuntu Nattu Narwhal 64 bits.

tags: added: encoding error natty subdownloader ubuntu unicodeencodeerror
tags: added: 64 bits
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Attila Lendvai (attila-lendvai) wrote :

not exactly the same, but:

version 2.0.14 on a file with non-ascii chars in its name.

Traceback (most recent call last):
  File "/usr/share/subdownloader/gui/main.py", line 927, in onFolderTreeClicked
    self.SearchVideos(folder_path)
  File "/usr/share/subdownloader/gui/main.py", line 764, in SearchVideos
    videos_found,subs_found = FileScan.ScanFilesFolders(path,recursively = True,report_progress = self.progress)
  File "/usr/share/subdownloader/FileManagement/FileScan.py", line 43, in ScanFilesFolders
    videos_found, subs_found = ScanFolder(path,recursively = True,report_progress=report_progress, progress_end=progress_end)
  File "/usr/share/subdownloader/FileManagement/FileScan.py", line 91, in ScanFolder
    report_progress(count,_("Parsing video: %s")% os.path.basename(filepath).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'\xe6' in position 20: ordinal not in range(128)

Revision history for this message
Csipak Attila (corphicks) wrote :

I can confirm the exact same bug on:

Ubuntu 12:04 LTS (x86)
subdownloader 2.0.14

Changed in subdownloader:
status: New → Confirmed
Revision history for this message
Csipak Attila (corphicks) wrote :

The error message in the bug description is also very similar to that quoted in Bug #306589, only source file line numbers differ a a little bit.

Changed in subdownloader (Ubuntu):
status: New → Confirmed
Revision history for this message
Csipak Attila (corphicks) wrote :

The workaround described in Bug #306589 Comment #12 has solved this exact bug for me.

This bug is a duplicate of Bug #306589, indeed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.