python 3.7.7pip 19.0.3google-api-python-client version: 1.8.2from googleapiclient.discovery import build
build('youtube', "v3", developerKey="developer_key")
googleapiclient.errors.UnknownApiNameOrVersion: name: youtube version: v3
Hello,
While trying to get data from YouTube Data API get this error UnknownApiNameOrVersion.
Looks like youtube v3 api dont have discovery v2 url.
Thanks!
We also have the same issue.
It started triggering on and off (resolving itself on auto-retries) from late afternoon Wed 22nd April. It is now always failing as of 8am UK time on the 23rd.
This was also raised here and perfectly describes our issue too:
https://stackoverflow.com/questions/61365111/youtube-data-api-build-function-doesn%c2%b4t-work
We are on: 1.7.8 but I feel it might not be version dependent.
Same Here using 1.8.2
After tracing the source code
https://github.com/googleapis/google-api-python-client/blob/8ed729f1d868a8713ab442bf0bf59e77ba36afb6/googleapiclient/discovery.py#L223-L243
I'm guessing somthing went wrong on Google's Server
I encountered the same issue with googleapiclient versions 1.7.11, 1.8.0, and 1.8.2. I initially thought the issue was version dependent, but have now had the problem with all versions I tested. The problem also occurs on google colab (on colab I tried versions 1.7.12 and 1.8.2, both are affected).
Strangely, the issue is not completely reproducible. In other words, a small percentage of calls to googleapiclient.discovery.build(service_name, version) actually work.
Hi all - the server theory is correct. The version of the library you are using should not matter. The discovery document is fetched from https://www.googleapis.com/discovery/v1/apis/youtube/v3/rest (which is unfortunately down right now).
If you're experiencing unreliability you may want to temporarily download the document and use build_from_document.
I'll file a bug internally to make sure folks know this is down.
Thanks for the report!
Thanks @busunkim96. Here is a little example of the solution you suggested, seems to work for me.
Quick update: the change that caused this issue is being rolled back.
Quick update: the change that caused this issue is being rolled back.
I see a spike in the Grafana which is monitoring our platform, it looks like they really did it.
Been happening on and off for me as well:
Traceback (most recent call last):
File "app.py", line 8, in
from Engine.ThreadAPIs import ThreadEngine
File "/Users/ahmedsalem/Desktop/Spring 2020/Senior Design/SoundShow/SoundShow/Engine/ThreadAPIs/ThreadEngine.py", line 9, in
from Engine import searchGoogle, searchYoutube, searchSpotify
File "/Users/ahmedsalem/Desktop/Spring 2020/Senior Design/SoundShow/SoundShow/Engine/searchYoutube.py", line 12, in
youtube_object = build(YOUTUBE_API_SERVICE_NAME, YOUTUBE_API_VERSION,
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
return wrapped(args, *kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/googleapiclient/discovery.py", line 233, in build
raise UnknownApiNameOrVersion(
googleapiclient.errors.UnknownApiNameOrVersion: name: youtube version: v3
Closing as this is now resolved.
Most helpful comment
Quick update: the change that caused this issue is being rolled back.