emericg / OpenSubtitlesDownload

Automatically find and download the right subtitles for your favorite videos!
https://emeric.io/OpenSubtitlesDownload
GNU General Public License v3.0
581 stars 63 forks source link

Error with Python 2.7 #36

Closed mauriziotallarico closed 6 years ago

mauriziotallarico commented 6 years ago

Hello i'm getting this error

('Unexpected error:', "<type 'exceptions.AttributeError'>")

on Debian with Python2.7.13.

Everything works fine with python3.5.3

I'm calling OpenSubtitlesDownload from a CLI script (bash). I could also insert a check to run it only if python3 is installed but maybe is useful for You to understand the issue. Thanks! Maurizio

emericg commented 6 years ago

Hi, I cannot reproduce the error here on python 2.7.15, with the cli and various settings tried. Are you using the git version? Do you think you can try to pinpoint where this error is happening or what combination of settings would trigger it (like multiple languages, or anything).

Everything that is different between python 2 and 3 is protected by version check, so this script should work fine with both.

Thanks

mauriziotallarico commented 6 years ago

Hi, yes cloned just today. I can try to debug. regarding the settings i've tried without settings at all initially. I tried also to force the CLI (--cli) but same error. Tried with a couple of languages too (eng and ita) same error. i'll try with a different file but as i've said, on the same file with Python3 it works . thanks

utomsig commented 6 years ago

Hi! The same thing did happen to me with python 2.7.12, but it's working fine with 3.5. But, it only happens with avi files. I had two, and downloaded two others movies with the same outcome. mkv and mp4 files seems to be working fine.

$ python ~/bin/OpenSubtitlesDownload.py -v 'lony.S02E02.WEB-DLRip.Rus.Eng.LostFilm.avi'
Unknown GUI, falling back to an automatic CLI mode
('Unexpected error:', "<type 'exceptions.AttributeError'>")

I did clone your git today, and here's my system:

$ uname -a
Linux simon-dell 4.13.0-43-generic #48~16.04.1-Ubuntu SMP Thu May 17 12:56:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ python --version
Python 2.7.12

I don't know if this is relevant but here's the output from python2.7-dbg opensubtitlesdownload.log

Thanks for your program! /Simon

emericg commented 6 years ago

Ok I found the error, it should be fixed now. There is still another one lurking in pretty much the same place but happening only when the osd servers are overloaded, so... it happened a couple of time this morning but... not anymore ><