☆
6
RuntimeError no running event loop in a thread after upgrade
Python 3.12, after upgrading from 3.10. I've got a function that calls asyncio.get_event_loop() and then loop.run_until_complete(...). It's being called from a concurrent.futures.ThreadPoolExecutor worker. Worked fine on 3.10, now I get RuntimeError: no running event loop and also a deprecation warning about get_event_loop. I can't easily make the whole call stack async. What's the least bad fix here?
1 replies