Comment 19 for bug 790753

Revision history for this message
Filip Oลกฤรกdal (filip-mxd-cz) wrote : Re: [Bug 790753] Re: subdownloader ubuntu Error "Unable to download subtitle abc.srt"

start xterm or similar CLI terminal, enter:

sudo nano /usr/share/subdownloader/gui/main.py

find using CTRL+W this line:

osHttpRequests.download('http://www.opensubtitles.org/en/download/file/%s.gz'
%sub.getIdFileOnline(), destinationPath)

and replace it with:

self.OSDBServer.DownloadSubtitles({sub.getIdFileOnline():destinationPath})

CTRL+O to write, CTRL+X to exit & start the app

Hope this helps! Cheers, Filip ๐Ÿ˜†

On Thu, Jan 7, 2016, 18:24 Filip Oลกฤรกdal โ˜ฏ mxd.cz <email address hidden> wrote:

> the patch is just 1 line replacement using "sudo nano" or "sudo gedit",
> works on downloads issue, not related to VIP status
>
> I am at Tesco, will try to fetch you the patch
>
>
> On Thu, Jan 7, 2016, 18:21 Simone <email address hidden> wrote:
>
>> @Filip could you explain how to do that? What editor should we use? What
>> line should we replace? Is the patch working for non-vip users also?
>>
>> --
>> You received this bug notification because you are subscribed to a
>> duplicate bug report (1264365).
>> https://bugs.launchpad.net/bugs/790753
>>
>> Title:
>> subdownloader ubuntu Error "Unable to download subtitle abc.srt"
>>
>> Status in SubDownloader:
>> New
>>
>> Bug description:
>> I always get this error when I try to download a subtitle. It happened
>> suddenly when I was updating my system.
>> The error I get is "Unable to download subtitle abc.srt" and if I run
>> Subdownloader in terminal with this command "subdownloader -d" then the
>> error output is after I press download:
>>
>> [15:43] DEBUG::subdownloader.gui.main # Downloading to:
>> u'/home/siggihp/Downloads/Cougar.Town.S02E21E22.HDTV.XviD-LOL.srt'
>> [15:43] DEBUG::subdownloader.gui.main # Trying to download subtitle
>> '/home/siggihp/Downloads/Cougar.Town.S02E21E22.HDTV.XviD-LOL.srt'
>> [15:43] DEBUG::subdownloader.gui.main # Downloading subtitle
>> '/home/siggihp/Downloads/Cougar.Town.S02E21E22.HDTV.XviD-LOL.srt'
>> [15:43] DEBUG::subdownloader.httpsearch.OSHttpSearch # Downloading
>> subtitle from url:
>> http://www.opensubtitles.org/en/download/file/1952866062.gz
>> [15:43] DEBUG::subdownloader.httpsearch.OSHttpSearch # Unpacking and
>> savinng to: /home/siggihp/Downloads/Cougar.Town.S02E21E22.HDTV.XviD-LOL.srt
>> Traceback (most recent call last):
>> File "/usr/share/subdownloader/gui/main.py", line 1126, in
>> onButtonDownload
>> osHttpRequests.download('
>> http://www.opensubtitles.org/en/download/file/%s.gz'
>> %sub.getIdFileOnline(), destinationPath)
>> File "/usr/share/subdownloader/modules/OSHttpRequests.py", line 72,
>> in download
>> self.unpack_subtitle(gz_path, local_path)
>> File "/usr/share/subdownloader/modules/OSHttpRequests.py", line 51,
>> in unpack_subtitle
>> fileContent = fileObj.readlines();
>> File "/usr/lib/python2.7/gzip.py", line 446, in readline
>> c = self.read(readsize)
>> File "/usr/lib/python2.7/gzip.py", line 252, in read
>> self._read(readsize)
>> File "/usr/lib/python2.7/gzip.py", line 287, in _read
>> self._read_gzip_header()
>> File "/usr/lib/python2.7/gzip.py", line 181, in _read_gzip_header
>> raise IOError, 'Not a gzipped file'
>> IOError: Not a gzipped file
>>
>> I've already tried to download subdownloader and install it again, but
>> I'm only able to find the latest version and that's the one that seems
>> corrupted.
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/subdownloader/+bug/790753/+subscriptions
>>
> --
>
> Filip Oลกฤรกdal, mobile
> system architect
> ATELIER\L SKKP-BRNO
>
--

Filip Oลกฤรกdal, mobile
system architect
ATELIER\L SKKP-BRNO