Message396014
demo:
import traceback
import io
async def foo():
yield 1
traceback.print_stack(file=io.StringIO())
yield 2
async def bar():
return [chunk async for chunk in foo()]
next(bar().__await__(), None)
print("working!")
Traceback (most recent call last):
File "/home/graingert/projects/anyio/foo.py", line 13, in <module>
next(bar().__await__(), None)
File "/home/graingert/projects/anyio/foo.py", line 10, in bar
return [chunk async for chunk in foo()]
File "/home/graingert/projects/anyio/foo.py", line -1, in <listcomp>
File "/home/graingert/projects/anyio/foo.py", line 6, in foo
traceback.print_stack(file=io.StringIO())
File "/usr/lib/python3.10/traceback.py", line 203, in print_stack
print_list(extract_stack(f, limit=limit), file=file)
File "/usr/lib/python3.10/traceback.py", line 224, in extract_stack
stack = StackSummary.extract(walk_stack(f), limit=limit)
File "/usr/lib/python3.10/traceback.py", line 379, in extract
f.line
File "/usr/lib/python3.10/traceback.py", line 301, in line
self._line = linecache.getline(self.filename, self.lineno).strip()
File "/usr/lib/python3.10/linecache.py", line 31, in getline
if 1 <= lineno <= len(lines):
TypeError: '<=' not supported between instances of 'int' and 'NoneType' |
|
Date |
User |
Action |
Args |
2021-06-17 18:49:12 | graingert | set | recipients:
+ graingert |
2021-06-17 18:49:12 | graingert | set | messageid: <1623955752.49.0.722717443318.issue44446@roundup.psfhosted.org> |
2021-06-17 18:49:12 | graingert | link | issue44446 messages |
2021-06-17 18:49:12 | graingert | create | |
|