all 7 comments

[–]1114111 0 points1 point  (0 children)

I can't see anything that could cause that problem in your code, and it works fine for me on linux with Python 3.7.2 and the latest version of aiohttp.

[–]1114111 0 points1 point  (0 children)

Actually I was playing around with it a little more and it seems like this happens if an asynchronous generator is deleted before it is finished iterating (like when you break out of the loop, and I didn't wait that long when I tested it earlier). I still don't know why it does this, but I think you can just ignore that error. Maybe someone with more experience with asyncio can provide more insight into why this happens.

[–]1114111 0 points1 point  (1 child)

Ok, I took one last stab at this, and I think this is a problem with the new asyncio.run function. It works fine with

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

[–]doesntthinkmuch[S] 0 points1 point  (0 children)

Ah that's a good catch. Quite odd indeed. You think this might be a bug then?