mps-youtube / yewtube

yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
GNU General Public License v3.0
8.07k stars 645 forks source link

unable to start #1076

Closed githubgnulinux closed 1 year ago

githubgnulinux commented 4 years ago

Traceback (most recent call last): File "/local/path/user/.local/lib/python3.5/site-packages/pafy/util.py", line 34, in call_gdata data = g.opener.open(url).read().decode('utf-8') File "/usr/lib/python3.5/urllib/request.py", line 472, in open response = meth(req, response) File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.5/urllib/request.py", line 510, in error return self._call_chain(args) File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain result = func(args) File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/bin/mpsyt", line 7, in from mps_youtube import main File "/local/path/user/.local/lib/python3.5/site-packages/mps_youtube/init.py", line 8, in init.init() File "/local/path/user/.local/lib/python3.5/site-packages/mps_youtube/init.py", line 58, in init cache.load() File "/local/path/user/.local/lib/python3.5/site-packages/mps_youtube/cache.py", line 34, in load pafy.load_cache(cached['pafy']) File "/local/path/user/.local/lib/python3.5/site-packages/pafy/pafy.py", line 184, in load_cache set_categories(newcache.get('categories', {})) File "/local/path/user/.local/lib/python3.5/site-packages/pafy/pafy.py", line 171, in set_categories catinfo = call_gdata('videoCategories', query) File "/local/path/user/.local/lib/python3.5/site-packages/pafy/util.py", line 42, in call_gdata raise GdataError(errmsg) pafy.util.GdataError: Youtube Error 403: Access Not Configured. YouTube Data API has not been used in project 422897895433 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=422897895433 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

yardenac commented 4 years ago

I get this too when using a VPN, but it works without the VPN. For some reason, it only matters during startup. I can turn off the VPN briefly, start mpsyt, then turn the VPN back on.

In my case anyway, the error message is clearly wrong. My API key isn't the problem. Does my workaround work for you too?

sedret452 commented 4 years ago

I had a similar problem, for quite some time. I thought the ID got revoked, or something. Tried over a longer time to upgrade the package, didn't help. Finally, decided to "investigate".

For me, cleaning the cache helped. Something similar to this:

mv ~/.config/mps-youtube/cache_py_3.7.3{,.bak}

P.S. Sadly, using youtube-dl --rm-cache-dir didn't help me.

Lestibournes commented 4 years ago

I had a similar problem, for quite some time. I thought the ID got revoked, or something. Tried over a longer time to upgrade the package, didn't help. Finally, decided to "investigate".

For me, cleaning the cache helped. Something similar to this:

mv ~/.config/mps-youtube/cache_py_3.7.3{,.bak}

P.S. Sadly, using youtube-dl --rm-cache-dir didn't help me.

I also had this issue, and this solution solved it, but only for opening the app. When I try to use: url [some video url] I still get the error:

Error fetching data. Possible network issue. Youtube Error 403: Access Not Configured. YouTube Data API has not been used in project 422897895433 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=422897895433 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

timostrating commented 4 years ago

I had a similar problem, for quite some time. I thought the ID got revoked, or something. Tried over a longer time to upgrade the package, didn't help. Finally, decided to "investigate".

For me, cleaning the cache helped. Something similar to this:

mv ~/.config/mps-youtube/cache_py_3.7.3{,.bak}

P.S. Sadly, using youtube-dl --rm-cache-dir didn't help me.

I can confirmed that removing this file fixed the issue for me. (depending on your python version the name is different) The other issue @Lestibournes is mentioning seams to be separate.

texincali commented 4 years ago

Any idea where that file is for windows? (id use Linux if I could, however, my work decided to move us to windows :-( )

firebird631 commented 4 years ago

Same issue, I've removed the cache and it worked too (Linux, Python 3.8.2).

mxxwll commented 4 years ago

Any idea where that file is for windows? (id use Linux if I could, however, my work decided to move us to windows :-( )

On CMD, enter: mpsyt -v Under config dir, you'll see the file location. Change cache_py to cache_py.bak

Fixed my issue on Windows 10.

WhiteHusky commented 4 years ago

This still seems to be an issue even on fd83301 and requires removing the cache to get the script running again.