Skip to content

Fix AttributeError on secondary rate limit check in arest - #364

Merged
ezyang merged 1 commit into
ezyang:mainfrom
guangyey:guangyey/fix
Jul 29, 2026
Merged

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

Conversation

@guangyey

@guangyey guangyey commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

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

@ezyang
ezyang enabled auto-merge (squash) July 29, 2026 03:16
@ezyang
ezyang merged commit 7e263bc into ezyang:main Jul 29, 2026
16 checks passed
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

2 participants