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
{{ message }}
Repository navigation
Lyrics: "too many 429 error responses" during bulk import (similar to #6728) #7226
I have recently been importing multiple albums, and have been receiving consistent "429 errors"
on just about every song during lyric lookup. A typical example follows:
lyrics: Genius: Request error: HTTPSConnectionPool(host='api.genius.com', port=443): Max retries exceeded with url: /search?q=Umphrey%27s+McGee+Prophecy+Now (Caused by ResponseError('too many 429 error responses'))
I was at beets version 2.12.0, and searching Github issues I found one that was very similar: #6728 .
It was closed and merged on June 11, which was very close to when 2.12.0 was released. So, I tried
upgrading earlier today to beets version 2.14.1, figuring the fix should be included (though, I couldn't
find it itemized in the fixes listed under "Releases"). However, the issue persists even after upgrading.
Lyrics tend to be successfully found and imported in spite of the 429 errors, but it adds significantly
to the processing time.
Setup
OS: Linux Mint 22.3 (Cinnamon 6.6.9)
Python version: 3.12.3
beets version: 2.14.1 (latest)
Turning off plugins made problem go away (yes/no): yes
I looked at the code: all requests go through TimeoutAndRetrySession (6 retries, backoff 0.5) and one rate limiter (0.25 s between requests) that is shared by every site. My guess is that this is too fast for Genius.
My proposal: make the rate limiter keep a separate timer per site, so that Genius can be given a slower limit while the other sources keep their current speed.
Other options would be to retry longer on 429, or to give up on a source sooner and show a clear message. I think the first one avoids the errors instead of reacting to them, but I am happy to do it differently if you prefer.
Thanks for the reply. For my particular situation, this does seem to happen most often with Genius, but I'm not familiar with
the code and don't know if a Genius-specific change would be best. It seems that another fix, #6729 , intended to add a
rate limiting throttle for 429 errors, but that was also from the June '26 time frame and so I would think that is included
in the 2.14.1 version I upgraded to.
But, if Genius is the outlier and changing it to a slower limit seems feasible, that seems like a reasonable approach.
Activity
Sabrina04072003 commentedon Nov 30, 2026
Hi! I would like to work on this issue.
I looked at the code: all requests go through
TimeoutAndRetrySession(6 retries, backoff 0.5) and one rate limiter (0.25 s between requests) that is shared by every site. My guess is that this is too fast for Genius.My proposal: make the rate limiter keep a separate timer per site, so that Genius can be given a slower limit while the other sources keep their current speed.
Other options would be to retry longer on 429, or to give up on a source sooner and show a clear message. I think the first one avoids the errors instead of reacting to them, but I am happy to do it differently if you prefer.
dannn-o commentedon Nov 30, 2026
Thanks for the reply. For my particular situation, this does seem to happen most often with Genius, but I'm not familiar with
the code and don't know if a Genius-specific change would be best. It seems that another fix, #6729 , intended to add a
rate limiting throttle for 429 errors, but that was also from the June '26 time frame and so I would think that is included
in the 2.14.1 version I upgraded to.
But, if Genius is the outlier and changing it to a slower limit seems feasible, that seems like a reasonable approach.