Skip to content
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

Quota limit reached? #286

Open
tthn0 opened this issue Feb 19, 2021 · 2 comments
Open

Quota limit reached? #286

tthn0 opened this issue Feb 19, 2021 · 2 comments

Comments

@tthn0
Copy link

tthn0 commented Feb 19, 2021

Youtube Error 403: The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota</a>.

@ipsavitsky
Copy link

get your own API key, it appears that pafy's internal key always has exceeded quota

you can read how to do that here

@zorgster
Copy link

zorgster commented Sep 5, 2022

I received this error too and I have just started using it. If the OP was trying to call video.description and received it then that's worth double checking. I have no problems calling any other command but the description call ends with a 403 - could a malformed request lead to a 403?:

>>> print(mypaf.description)
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/pafy/util.py", line 34, in call_gdata
    data = g.opener.open(url).read().decode('utf-8')
  File "/usr/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 650, 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 "<stdin>", line 1, in <module>
  File "/home/user/.local/lib/python3.6/site-packages/pafy/backend_shared.py", line 292, in description
    self._fetch_gdata()
  File "/home/user/.local/lib/python3.6/site-packages/pafy/backend_youtube_dl.py", line 69, in _fetch_gdata
    item = self._get_video_gdata(self.videoid)['items'][0]
  File "/home/user/.local/lib/python3.6/site-packages/pafy/backend_shared.py", line 125, in _get_video_gdata
    gdata = call_gdata('videos', query)
  File "/home/user/.local/lib/python3.6/site-packages/pafy/util.py", line 42, in call_gdata
    raise GdataError(errmsg)
pafy.util.GdataError: Youtube Error 403: The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota</a>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants