3

It was a great application once, but for me at least it hasn't worked for the last several months.

I can search for subtitles, but when I try to download one, it always displays the message Unable to download subtitle <subtitle_name>. I checked the folder the .gz file was downloaded to, and it's not a valid archieve. This error/warning message is dumped in the console-

(python:21104): Gtk-CRITICAL **: IA__gtk_progress_configure: assertion 'value >= min && value <= max' failed

(python:21104): Gtk-CRITICAL **: IA__gtk_progress_configure: assertion 'value >= min && value <= max' failed

(python:21104): Gtk-CRITICAL **: IA__gtk_progress_configure: assertion 'value >= min && value <= max' failed
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 455, in readline
    c = self.read(readsize)
  File "/usr/lib/python2.7/gzip.py", line 261, in read
    self._read(readsize)
  File "/usr/lib/python2.7/gzip.py", line 296, in _read
    self._read_gzip_header()
  File "/usr/lib/python2.7/gzip.py", line 190, in _read_gzip_header
    raise IOError, 'Not a gzipped file'
IOError: Not a gzipped file

If this problem is not solvable, could anyone please suggest a alternative that can download subtitles in a bulk, for example for all videos in a folder?

0

From https://bugs.launchpad.net/subdownloader/+bug/790753 I had a solution:

In the file /usr/share/subdownloader/gui/main.py: Comment line 1143, uncomment the four next lines.

Patch:

--- /usr/share/subdownloader/gui/main.py.orig   2016-01-15 20:04:50.880252934 +0100
+++ /usr/share/subdownloader/gui/main.py    2016-01-15 20:05:04.380514034 +0100
@@ -1140,11 +1140,11 @@
                    if not skip_all:
                         log.debug("Downloading subtitle '%s'" % destinationPath)
            #print {sub.getIdFileOnline():destinationPath}
-                        osHttpRequests.download('http://www.opensubtitles.org/en/download/file/%s.gz' %sub.getIdFileOnline(), destinationPath)
-                        #if self.OSDBServer.DownloadSubtitles({sub.getIdFileOnline():destinationPath}):
-                            #success_downloaded += 1
-                        #else:
-                            #QMessageBox.about(self.window,_("Error"),_("Unable to download subtitle %s") %sub.getFileName())
+                        #osHttpRequests.download('http://www.opensubtitles.org/en/download/file/%s.gz' %sub.getIdFileOnline(), destinationPath)
+                        if self.OSDBServer.DownloadSubtitles({sub.getIdFileOnline():destinationPath}):
+                            success_downloaded += 1
+                        else:
+                            QMessageBox.about(self.window,_("Error"),_("Unable to download subtitle %s") %sub.getFileName())
                 except Exception, e:
                     traceback.print_exc(e)
                     QMessageBox.about(self.window,_("Error"),_("Unable to download subtitle %s") % sub.getFileName())
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.