Comment 2 for bug 363116

Revision history for this message
Rogério Theodoro de Brito (rbrito) wrote :

Hi.

I am also affected by this bug. For the record, I was trying to search for subtitles for a DVD dump (with mplayer -dumpstream etc) from a DVD that I own.

I got some messages on the console:

rbrito@cruz:~/Desktop/torrents$ subdownloader
/usr/lib/python2.6/dist-packages/kaa/metadata/disc/cdrom.py:37: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
[19:19] INFO::metadata # No Type found by Extension (.cue). Trying all parsers.
[19:19] INFO::metadata # Invalid header
[19:19] INFO::metadata # trying mpeg-pes scan
[19:19] INFO::metadata # No Type found by Extension (.cue). Trying all parsers.
[19:19] INFO::metadata # Invalid header
[19:19] INFO::metadata # trying mpeg-pes scan
[19:19] INFO::metadata # No Type found by Extension (.cue). Trying all parsers.
[19:19] INFO::metadata # Invalid header
[19:19] INFO::metadata # trying mpeg-pes scan
[19:19] INFO::metadata # No Type found by Extension (.cue). Trying all parsers.
[19:19] INFO::metadata # Invalid header
[19:19] INFO::metadata # trying mpeg-pes scan
[19:19] INFO::metadata # No Type found by Extension (.cue). Trying all parsers.
[19:19] INFO::metadata # Invalid header
[19:19] INFO::metadata # trying mpeg-pes scan
[19:19] INFO::metadata # No Type found by Extension (.cue). Trying all parsers.
[19:19] INFO::metadata # Invalid header
[19:19] INFO::metadata # trying mpeg-pes scan
[19:19] INFO::metadata # No Type found by Extension (.cue). Trying all parsers.
[19:19] INFO::metadata # Invalid header
[19:19] INFO::metadata # trying mpeg-pes scan
[19:19] INFO::metadata # No Type found by Extension (.cue). Trying all parsers.
[19:19] INFO::metadata # Invalid header
[19:19] INFO::metadata # trying mpeg-pes scan
[19:19] INFO::metadata # No Type found by Extension (.cue). Trying all parsers.
[19:19] INFO::metadata # Invalid header
[19:19] INFO::metadata # trying mpeg-pes scan
[19:19] INFO::metadata # No Type found by Extension (.vob). Trying all parsers.
[19:19] INFO::metadata # Invalid header
[19:19] INFO::metadata # No Type found by Extension (.vob). Trying all parsers.
[19:19] INFO::metadata # Invalid header
Traceback (most recent call last):
  File "/usr/share/subdownloader/gui/main.py", line 913, in onButtonFind
    self.SearchVideos(folder_path)
  File "/usr/share/subdownloader/gui/main.py", line 785, in SearchVideos
    videos_found,subs_found = FileScan.ScanFilesFolders(path,recursively = True,report_progress = self.progress)
  File "/usr/share/subdownloader/FileManagement/FileScan.py", line 58, 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 119, in ScanFolder
    report_progress(count,_("Parsing sub: %s") % os.path.basename(filepath).decode(sys.getfilesystemencoding()))
  File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa2 in position 2: unexpected code byte

I did have a file that isn't UTF-8-encoded on the directory where the video dump was supplied.

Perhaps the code could be a bit more robust by making the the exception trapped and one fallback (say, latin-1) used to decode, before giving up.

Thanks, Rogério Brito.