RuntimeError: Timeout context manager should be used inside a task
- uvloop version:uvloop==0.13.0
- Python version: 3.7.3
- Platform: debian 10
- uvloop version:uvloop==0.13.0
- Python version: 3.7.3
- Platform: debian 10
traceback : https://pastebin.com/q2yvq236 handler: https://pastebin.com/RhdV38Zw class pastebin : https://gist.github.com/dark0ghost/216348a1ed14468933bf649c1427af21 was use uvloop and send traceback, if use asyncio loop , then no traceback
@asvetlov Any ideas what might be going on here? I'm wondering why the behaviour of aiohttp.Timeout might be different on vanilla vs uvloop
The error is generated if asyncio.current_task() returns None.
Normally, it should never happen if the call is performed from async function like in provided code snippets (await aiohttp_session.post(...))
What need information?
Instruction on how to reproduce the problem locally on my laptop would be awesome!
FYI, I'm able to run aiohttp test suite on uvloop without any problem except one test that heavily mocks asyncio transport details.
Full code https://github.com/dark0ghost/async_py_bot, but need fill json , then bot started. Or unplug module
It doesn't look like the easy reproducible example, sorry.
@dark0ghost would really help if you could give us a single Python file that reproduces the bug along with clear instructions how to run it.
https://github.com/dark0ghost/async_py_bot/blob/master/handlers/message_handler.py#L201
launched this https://gist.githubusercontent.com/dark0ghost/3c8d963a2c2690237eae26c0ebe7f9cb/raw/79a734cde999cd7e1138de39d15391ad232ac25f/Pastebin.py so this bug is not, because use full code, to get that bug