New submission from Timur Irmatov <irma...@gmail.com>:

Sometimes during shutdown of our simple http server based on asyncio/ aiohttp 
we get following stack trace:

ERROR    [2018-01-24 08:28:33,398]: Exception in default exception handler 
while handling an unexpected error in custom exception handler
Traceback (most recent call last):
  File "/opt/alt/python35/lib64/python3.5/asyncio/base_events.py", line 1293, 
in call_exception_handler
    self._exception_handler(self, context)
  File "/opt/alt/python35/bin/imunify360-captchaserver", line 640, in 
_error_handler
    loop.default_exception_handler(context)
  File "/opt/alt/python35/lib64/python3.5/asyncio/base_events.py", line 1256, 
in default_exception_handler
    value = repr(value)
  File "/opt/alt/python35/lib64/python3.5/asyncio/futures.py", line 213, in 
__repr__
    info = self._repr_info()
  File "/opt/alt/python35/lib64/python3.5/asyncio/tasks.py", line 96, in 
_repr_info
    info = super()._repr_info()
  File "/opt/alt/python35/lib64/python3.5/asyncio/futures.py", line 205, in 
_repr_info
    if self._callbacks:
AttributeError: 'Task' object has no attribute '_callbacks'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/alt/python35/lib64/python3.5/asyncio/base_events.py", line 1301, 
in call_exception_handler
    'context': context,
  File "/opt/alt/python35/lib64/python3.5/asyncio/base_events.py", line 1256, 
in default_exception_handler
    value = repr(value)
  File "/opt/alt/python35/lib64/python3.5/asyncio/futures.py", line 213, in 
__repr__
    info = self._repr_info()
  File "/opt/alt/python35/lib64/python3.5/asyncio/tasks.py", line 96, in 
_repr_info
    info = super()._repr_info()
  File "/opt/alt/python35/lib64/python3.5/asyncio/futures.py", line 205, in 
_repr_info
    if self._callbacks:
AttributeError: 'Task' object has no attribute '_callbacks'

Is this some bug or consequence of our code not cancelling/ waiting for all 
coroutines?

----------
components: asyncio
messages: 310616
nosy: Timur Irmatov, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: AttributeError: 'Task' object has no attribute '_callbacks'
type: behavior
versions: Python 3.5

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

Reply via email to