Skip to content

Fix AttributeError on secondary rate limit check in arest#364

Open
guangyey wants to merge 1 commit into
ezyang:mainfrom
guangyey:guangyey/fix
Open

Fix AttributeError on secondary rate limit check in arest#364
guangyey wants to merge 1 commit into
ezyang:mainfrom
guangyey:guangyey/fix

Conversation

@guangyey

@guangyey guangyey commented Jul 24, 2026

Copy link
Copy Markdown

Motivation

The secondary rate limit detection used resp.content.lower(), but
resp.content is an aiohttp StreamReader without a .lower() method,
and the response body had already been consumed by await resp.json().

Fix it via reuse resp.text();

Additional Context

Fix #365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Error] AttributeError: 'StreamReader' object has no attribute 'lower' on 0.16.0

1 participant