AttributeError: type object 'async_generator_asend' has no attribute 'f_lineno'
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the multipart upload with Python 3.12.11, uvloop 0.21.0, FastAPI, and uvicorn on Linux. Then inspect uvloop/loop.pyx around _asyncgen_finalizer_hook and uvloop/cbhandles.pyx around extract_stack, using the traceback.py call path as context. Done means async-generator cleanup no longer raises the reported AttributeError.
Written by the indexing model from the issue text.
Description
Bug Description
Getting AttributeError: type object 'async_generator_asend' has no attribute 'f_lineno' exceptions when handling multipart form uploads in FastAPI with uvloop.
Environment
- Python version: 3.12.11
- uvloop version: 0.21.0
- OS: Linux (Docker)
- Framework: FastAPI with uvicorn
Steps to Reproduce
- Use FastAPI with uvloop enabled
- Upload file via multipart form data
- Exception appears in logs during async generator cleanup
Full Traceback
Exception ignored in: <async_generator object Request.stream at 0x7f6f1be8f920>
Traceback (most recent call last):
File "uvloop/loop.pyx", line 3187, in uvloop.loop.Loop._asyncgen_finalizer_hook
File "uvloop/loop.pyx", line 1289, in uvloop.loop.Loop.call_soon_threadsafe
File "uvloop/cbhandles.pyx", line 329, in uvloop.loop.new_Handle
File "uvloop/cbhandles.pyx", line 15, in uvloop.loop.Handle._set_loop
File "uvloop/cbhandles.pyx", line 427, in uvloop.loop.extract_stack
File "/usr/local/lib/python3.12/traceback.py", line 395, in extract
return klass._extract_from_extended_frame_gen(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/traceback.py", line 418, in _extract_from_extended_frame_gen
for f, (lineno, end_lineno, colno, end_colno) in frame_gen:
^^^^^^^^^
File "/usr/local/lib/python3.12/traceback.py", line 392, in extended_frame_gen
for f, lineno in frame_gen:
^^^^^^^^^
File "/usr/local/lib/python3.12/traceback.py", line 336, in walk_stack
yield f, f.f_lineno
^^^^^^^^^^
AttributeError: type object 'async_generator_asend' has no attribute 'f_lineno'
- Dominant language
- Cython
- Stars
- 11.9k
- Forks
- 615
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MagicStack/uvloop
-
License not clear Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MagicStack/uvloop#759 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MagicStack/uvloop#741 · 2 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MagicStack/uvloop#702 · 8 comments · 9 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
MagicStack/uvloop#766 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
MagicStack/uvloop#765 ·
All issues in MagicStack/uvloop
Similar issues
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
growthbook/growthbook#7100 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
punkpeye/mcp-remote#369 ·
-
Client customer-reported needs-team-attention question Service Attention WebPubSub
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Azure/azure-sdk-for-net#63292 · 3 comments · 1 reaction ·
-
bug p:3-mid pydanty:bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pydantic/pydantic-ai#8643 · 1 comment ·