Exception ignored in: <object repr() failed> when quit · Issue #423 · python/asyncio (original) (raw)

This repository was archived by the owner on Nov 23, 2017. It is now read-only.

This repository was archived by the owner on Nov 23, 2017. It is now read-only.

@ahuigo

Description

@ahuigo

The following program sometime produces Exception ignored in: <object repr() failed> when quit

import asyncio
async def coro(name):
    await asyncio.sleep(1)
    print('coro {}: waiting for lock'.format(name))

loop = asyncio.get_event_loop()
coros = asyncio.gather(coro(1), coro(2 ))
loop.run_until_complete(coros)
loop.close()
quit()

Here is output of the program above.
My platform is : Mac OS X, python3.5.2

coro 1: waiting for lock
coro 2: waiting for lock
Exception ignored in: <object repr() failed>
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 85, in __del__
AttributeError: 'NoneType' object has no attribute '_PENDING'
Exception ignored in: <object repr() failed>
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 85, in __del__
AttributeError: 'NoneType' object has no attribute '_PENDING'