You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Spotify blocked one of my API keys. I noticed this when I was running a simple Spotipy example (just searching an artist name), and Spotipy failed after retrying 3 times. I changed the credentials on my Spotipy script, but the failure was the same. After ~2 hours of debugging, I realized that Spotipy was using the .cache with the old key so, after deleting this file, it used my new key and everything worked.
Describe the solution you'd like
I see two potential solutions:
Include a hash of the credentials in the cache. If this hash changes, invalidate the cache. This feels correct.
Invalidate the cache if the credentials become invalid. This is already done for timeouts, but AFAIK it isn't done in the case where the API key is blocked by Spotify.
Describe alternatives you've considered
It wasn't clear that the issue was with my credentials. I just ran Spotipy and it took a while to run (because it was retrying 3x), and then failed with a 429 Too Many Requests error. A clearer error message would have made my life easier.
The text was updated successfully, but these errors were encountered:
After some internal discussions with @stephanebruckert, we came to the conclusion that this change should be kept for the v3 release, as it would be somewhat difficult and unstable to implement a solution that is also backwards compatible. Also, this problem does not only affect the CacheFileHandler, but pretty much any other cache handler that has some kind of name attribute.
Is your feature request related to a problem? Please describe.
Spotify blocked one of my API keys. I noticed this when I was running a simple Spotipy example (just searching an artist name), and Spotipy failed after retrying 3 times. I changed the credentials on my Spotipy script, but the failure was the same. After ~2 hours of debugging, I realized that Spotipy was using the
.cache
with the old key so, after deleting this file, it used my new key and everything worked.Describe the solution you'd like
I see two potential solutions:
Describe alternatives you've considered
It wasn't clear that the issue was with my credentials. I just ran Spotipy and it took a while to run (because it was retrying 3x), and then failed with a 429 Too Many Requests error. A clearer error message would have made my life easier.
The text was updated successfully, but these errors were encountered: