Irit Katriel <iritkatr...@gmail.com> added the comment:

This is a duplicate of bpo-45924.  The traceback accumulates another frame 
every time the exception is raised. To see that, change main in your script to 

async def main():
    task = asyncio.create_task(task_that_raise())
    while True:
        try:
            await task
        except Exception as e:
            print("<<<<<<<<<<<<<<<<<<<<<<<<<<<")
            traceback.print_exception(e)
            print(">>>>>>>>>>>>>>>>>>>>>>>>>>>")



and notice that in the output, X grows every time in the line like

    [Previous line repeated X more times]

----------
nosy: +iritkatriel
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Incorrect traceback when future's exception is raised multiple 
times
versions:  -Python 3.7, Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46954>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to