Closed githubgnulinux closed 1 year 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?
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 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.
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.
Any idea where that file is for windows? (id use Linux if I could, however, my work decided to move us to windows :-( )
Same issue, I've removed the cache and it worked too (Linux, Python 3.8.2).
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.
This still seems to be an issue even on fd83301 and requires removing the cache to get the script running again.
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.