emericg / OpenSubtitlesDownload

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

Error: [class 'OSError'] - Manjaro + XFCE #43

Closed sdrubble closed 5 years ago

sdrubble commented 5 years ago

Hi emericg ,

I just downloaded today's version of OpenSubtitlesDownload.py. This is the command line I ran and the msgs I've got:

$ ./OpenSubtitlesDownload.py --cli --auto '/mnt/hgfs/F_series_downloaded/movie.mkv'
>> Downloading 'English' subtitles for 'movie'
>> OpenSubtitlesDownload encountered an unknown error, sorry about that...
Error: [class 'OSError']
Line: 750
Just to be safe, please check:
- www.opensubtitles.org availability
- Your downloads limit (200 subtitles per 24h)
- Your Internet connection status
- That are using the latest version of this software ;-)
$ 

This was run on a Manjaro Linux VM, XFCE flavor, under VMWare Workstation on a Windows 7 host. Not sure it matters here, but the .MKV file mentioned in the command sits within an NTFS file system, shared as read-only thru the "Shared Folders" feature of VMWare.

Am I doing anything wrong here ? Thx a lot for your help ! :)

sdrubble commented 5 years ago

Well, I just fixed it myself: I re-shared the 'culprit' host folder housing the video file - this time as read+write. Then I re-ran the exact same command, and voilà - the subtitle was downloaded instantaneously.

Not being a [frequent] programmer, I got my hint by looking at your source code in general, then paying closer attention to line 750, and finally asking Google about the wb thingy.

While my specific issue is indeed solved, I'll leave this issue open for now. Would suggest you to maybe add, to the 'requirements' section of your program, some info about needing WRITE permission to the directory where the video file resides.

Other than that - for whenever you're feeling particularly generous - I'd suggest an additional feature to the program: one more optional CLI switch, allowing users to supply an alternative path for the subtitle(s) to be downloaded into. As a matter of fact, I was initially expecting the subtitle to be downloaded into the same directory as the program... but coming to think better of it, it wasn't really a sensible thing to expect.

Cheers, and thx for a very useful program ! :))

emericg commented 5 years ago

Hi! Yes indeed you need write permissions in the directory containing the video for the software to work. You are the second person opening an issue about read only video directory (see #37), so I'll do something about a CLI argument for output path. I can also probably put a "real" error on this particular case. It should have been an "download error" when using the GUI, I'll take a closer look at this.

Would suggest you to maybe add, to the 'requirements' section of your program, some info about needing WRITE permission to the directory where the video file resides.

I can make the readme more explicit about this yes. It's obvious for me but you are right it cannot be obvious for others if it's not explained anywhere!

emericg commented 5 years ago

Allright the README should be a little more explicit, AND the -o option should be working. If you could give it a try that would be awesome!