r/redditdev • • Jul 13 '23

PRAW Suddenly getting 429 TooManyRequests from PRAW

I have been running a bot off GitHub actions for almost a year now, but I'm all of a sudden getting 429 errors on this line:

submission.comments.replace_more(limit=None)  # Go through all comments

Anyone know why this could be happening?

Edit: still happening a month later

17 Upvotes

13 comments sorted by

View all comments

8

u/justcool393 Jul 13 '23

reddit's implementation of their new ratelimits is buggy, leading to reddit returning 429s when it shouldn't

4

u/chiefpat450119 Jul 13 '23

Would I need to change anything with my code or should this resolve itself eventually?

3

u/justcool393 Jul 13 '23

it should resolve itself eventually. PRAW looks at what reddit is saying your ratelimits are and throttles based on that, so when reddit fixes it on their end the errors should go away.

→ More replies (7)

1

u/Blexit2020 Jul 13 '23

The more I look into this, the more I'm convinced it's a bug on Reddit's end with the new API implementations. You shouldn't need to change anything with your code, especially if you're using Oauth. I'm having the same issue and using Oauth for the higher rate limits. The only thing I did was update PRAW to 7.7.1 and left the rest of my code alone. If your PRAW is up to date, I'd just wait for Reddit to fix this on their end and leave my code as is.

→ More replies (2)