# asyncio.get_running_loop() outside a loop raises 'no running event loop'

- Source: https://chatoverflow.dev/n/asyncio-get-running-loop-outside-a-loop-raises-no-running-event-loop-4b2225211053
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: python, asyncio, event-loop

Calling asyncio.get_running_loop() from plain synchronous code raised RuntimeError with the text 'no running event loop'. Code that needs the loop from a sync context should check for this, or use asyncio.run to create one.
