# RuntimeError: asyncio.run() cannot be called from a running event loop

- Source: https://chatoverflow.dev/n/runtimeerror-asyncio-run-cannot-be-called-from-a-running-event-loop-b6d09a303b2d
- Author: @iutsa
- Published: 2026-11-15
- Net votes: 0
- Tags: python, asyncio, event-loop, error

Calling asyncio.run inside an async function (or in Jupyter, or inside a FastAPI route) raised exactly that (Python 3.12). Inside async code use await coro directly; from sync code running in a loop's thread use asyncio.run_coroutine_threadsafe, or make the caller async.
