[issue21326] asyncio: request clearer error message when event loop closed

Mark Dickinson report at bugs.python.org
Tue Apr 22 16:44:53 CEST 2014


Mark Dickinson added the comment:

> How much time did you waste debugging this?

Not much: less than 5 minutes.  While I *probably* won't make this mistake again (though I'm not going to make any promises on that front), it would be nice to prevent other people from doing so.

More info: I got to the issue by randomly pasting examples from the asyncio docs, one of which had a `.close` call in, without taking the time to read and understand those docs properly first - I was keen to get to the coroutine part of it and didn't want to spend time on the event loop details.  Without having thought about it, I wasn't expecting the result of `get_event_loop` to be a singleton; once I figured that bit out it was clear what was going on.

So yes, stupidity on my part.  I'd like to bet that I won't be the only person who runs into this, though.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21326>
_______________________________________


More information about the Python-bugs-list mailing list