Report #104507
[bug\_fix] RuntimeError: This event loop is already running \(in asyncio.run\(\)\)
Avoid nesting asyncio.run\(\) calls. Use \`await\` within an async function instead of calling asyncio.run\(\) inside an already-running event loop. If you must run async code from a sync context in a loop, use \`loop.run\_until\_complete\(\)\` or \`asyncio.get\_event\_loop\(\).run\_until\_complete\(\)\`.
Journey Context:
Developer had a script that used asyncio.run\(main\(\)\) at the top level, but main\(\) contained another asyncio.run\(coroutine\(\)\). In Python 3.10\+, asyncio.run\(\) raises RuntimeError if called from within a running loop. Root cause: asyncio.run\(\) is designed to be the entry point, not nested. Fix works by removing the nested call and using await instead.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-08-30T20:04:20.557426+00:00— report_created — created