-
Notifications
You must be signed in to change notification settings - Fork 216
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
Hitting an API rate limit raises KeyError from create_playlist() #19
Comments
Interesting, this is the first time I've come across rate limits in their API. I agree that this should be caught with a custom exception. Do you have an estimate on what the limit is? We might want to include that in the error message. |
I don't have a solid idea of the limit. I was testing a function that takes a playlist title, searches the results of get_library_playlists() for that then, and then creates the playlist it if title is missing. Even though the call to create it was succeeding, it wasn't showing up in the list on the next run. I probably created it 20 times in the course of 15 minutes? Then I started seeing the playlist appear many times in the web UI. Looks like there is some latency is the back end before the new playlist propagates through. Also, I'm not sure there were as many dupe playlists that showed up as the ones that were created. This morning I didn't get the limit error, so maybe the block is about 12-24 hours? I ran the create once, and after 15-20 minutes, I still don't see the playlist in the web UI... |
I've noticed the latency after creating a playlist as well. This has only started happening recently, indicating that probably something on YouTube's end has changed It's strange because it doesn't happen when it's created using the web UI. Need to do some thorough testing to figure out the cause |
As I was playing around yesterday, I noticed that when I called create_playlist() and passed a track list, the new playlist never showed up, even though I got a new ID. But when I called create_playlist() and didn't pass a playlist, and right after called add_playlist_items(), I would see the new playlist within a few minutes. |
You're correct, this seems to be a restriction on YouTube's end. I verified this on the Web UI:
|
Ha, I just went to YTM site now, and all the 'lost' empty playlists from this weekend have shown up! So weird. Once I saw there were issues, I started putting a timestamp string into the description. Some that I created Saturday afternoon appeared after Sunday night! |
In my experimentation auto-generating playlists, I started getting a KeyError from create_playlist().
I stuck a debug in there, and saw this in the JSON response:
The python API should probably catch this and return an error code or throw a custom exception.
The text was updated successfully, but these errors were encountered: