asyncio.get_event_loop(): DeprecationWarning: There is no current event loop
Your code will run on Python3.10 but as of 3.11 it will be an error to call asyncio.get_event_loop when there is no running loop in the current thread. Since you need loop as an argument to amain, apparently, you must explicitly create and set it. It is better to launch your main task with asyncio.run … Read more