unable to download any subtitles

Bug #1289949 reported by alanjeremy on 2014-03-09
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
SubDownloader
Undecided
Unassigned
subdownloader (Debian)
Fix Released
Unknown
subdownloader (Ubuntu)
Status tracked in Disco
Bionic
Undecided
Unassigned
Cosmic
Undecided
Unassigned
Disco
Undecided
Mattia Rizzolo

Bug Description

i cannot download any subtitles at all
the download button is grey and does not function
the log button is also grey and does not work
i tried to uninstall and reinstall; but that did not work
i made sure that port 8080 is open in my firewall
i use ubuntu 12.04 lts
if i ask for subtitles for a video file i have, i may get a list but cannot download any
if i give a movie name and ask for subtitles, i may get a list but cannot download anything

alanjeremy (deaton25) wrote :

also, now my Search button for Search by Movie Name does not work!!!!!

alanjeremy (deaton25) on 2014-03-09
Changed in subdownloader:
status: New → Incomplete
alanjeremy (deaton25) wrote :

my SUBDOWNLOADER is not downloading subtitles! It is not working!
If i click on a movie that i have already downloaded (first tab), a list of subtitles is compiled but the Download button will not work.
If i search for subtitles for a movie that i input into the search bar (second tab), a list is compiled.But the Download button does not work and no subtitles are downloaded.

PLEASE HELP

Launchpad Janitor (janitor) wrote :

[Expired for SubDownloader because there has been no activity for 60 days.]

Changed in subdownloader:
status: Incomplete → Expired
ds9 (stephane-lentz) wrote :

Subdownloader cannot save subtitles in directories non-ascii names : names which includes accents for instance : ~/Téléchargements

subdownloader will report when launched in cli :

Traceback (most recent call last):
  File "/usr/share/subdownloader/gui/main.py", line 1054, in onButtonDownload
    _("%s cannot be saved.\nCheck that the folder exists and you have write-access permissions.") %destinationPath ,
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 16: ordinal not in range(128)

ds9 (stephane-lentz) wrote :

Debug information :
[23:29] DEBUG::subdownloader.gui.videotreeview # setVideos-> len(videoResults) = 1
[23:29] DEBUG::subdownloader.gui.main # Downloading to: '/home/stephane/T\xc3\xa9l\xc3\xa9chargements/Arrow S02E20 HDTV XviD-FUM[ettv]/Arrow.S02E20.HDTV.XviD-FUM.srt'
[23:29] DEBUG::subdownloader.gui.main # Trying to download subtitle '/home/stephane/Téléchargements/Arrow S02E20 HDTV XviD-FUM[ettv]/Arrow.S02E20.HDTV.XviD-FUM.srt'
Traceback (most recent call last):
  File "/usr/share/subdownloader/gui/main.py", line 1054, in onButtonDownload
    _("%s cannot be saved.\nCheck that the folder exists and you have write-access permissions.") %destinationPath ,
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 16: ordinal not in range(128)

Benek (beniamin.kalinowski) wrote :

This is the problem with VideoFile object. It's _filepath attribute is one time encoded as a 'str' and other time as 'unicode'.

The fix:
in source: FileManagement/FileScan.py:

 def ScanFolder(folderpath, recursively=True, report_progress=None, progress_end=None):
+ if (type(folderpath) is not str):
+ folderpath = folderpath.encode(sys.getfilesystemencoding())
     # Let's reset the progress bar to 0%
     log.debug("Scanning Folder %s" % folderpath)

in source modules/videofile.py:

=== modified file 'modules/videofile.py'
--- modules/videofile.py 2011-02-13 09:15:02 +0000
+++ modules/videofile.py 2014-06-01 14:33:54 +0000
@@ -25,6 +25,9 @@

     def __init__(self, filepath):
         self._filepath = filepath
+ if (type(filepath) is not str):
+ import sys
+ self._filepath = filepath.encode(sys.getfilesystemencoding())
         self._size = os.path.getsize(filepath)
         self._hash = self.calculateOSDBHash()
         try:

Changed in subdownloader:
status: Expired → Confirmed
Mattia Rizzolo (mapreri) wrote :

This was fixed in 2.0.18-2.1 (as available in bionic), but then the change was reverted in 2.0.19-1 (in cosmic).

This is again fixed in the next upstream 2.1.0~rc4 that I'm preparing. I don't know if I'll get around to it in time for disco.

Changed in subdownloader (Ubuntu Bionic):
status: New → Fix Released
Changed in subdownloader (Ubuntu Cosmic):
status: New → Won't Fix
Changed in subdownloader (Ubuntu Disco):
status: New → In Progress
assignee: nobody → Mattia Rizzolo (mapreri)
Changed in subdownloader (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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