New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application crashes if the video is blocked by the copyright holders #837
Comments
I stumbled across same problem, root cause for this is unhandled exception at https://github.com/mps-youtube/mps-youtube/blob/master/mps_youtube/player.py#L48 88e0ecb#diff-455e9f21a8e3845a55401647c2c8eda4 this commit was good, but it was missing KeyError handling, which is the exception we are receiving. so, in short: adding this fixed the issue for me.
But, one could argue that for sake of stability, all exception should probably be caught there, as libraries around evolve and start generating different exception types, and this could cause problems in future, so might as well implement permanent fix. |
I think that with a bit of debugging one of these functions should be modified to catch this specific issue
|
Please catch this KeyError. Otherwise mpsyt is awesome. |
Latest 0.2.8 git version has this fix. |
Awesome |
@sdmunozsierra "except KeyError" isn't present in https://github.com/mps-youtube/mps-youtube/blob/master/mps_youtube/player.py#L48 version 0.2.8 (event on master). On my system I changed "except TypeError:" to "except:" and it fix the problem. |
The title is pretty much self explanatory, but as I saw in the code, there is a "pass" for videos that cannot be played, so I cannot suggest a solution for it. I'm also not sure whether it's an issue with mps-youtube or dl-youtube/pafy, because the error message that I get is just a mess.
PS I also could not get next/previous keys (< and >) working both on Windows and Ubuntu, are they currently broken?
Issue / Suggestion
Not to waste any space here, I'll put the error message on gist
Environment
mpsyt version : 0.2.8
notes : released 17 February 2018
pafy version : 0.5.4 (youtube-dl backend)
youtube-dl version : 2018.03.14
Python version : 3.6.5 (default, Apr 1 2018, 05:46:30)
[GCC 7.3.0]
Processor : x86_64
Machine type : x86_64
Architecture : 64bit, ELF
Platform : Linux-4.15.0-22-generic-x86_64-with-Ubuntu-18.04-bionic
sys.stdout.enc : UTF-8
default enc : utf-8
Config dir : /home/ac130kz/.config/mps-youtube
env:TERM : xterm-256color
env:SHELL : /bin/bash
env:LANG : en_US.UTF-8
env:LANGUAGE : en_US
OS: xubuntu 18.04
mpv 0.27.2
The text was updated successfully, but these errors were encountered: