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

- **ID:** `python/asyncio-runner-not-found`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

asyncio.run() is called inside an async function where an event loop is already running, causing a nested loop conflict.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.10 | active | — | — |
| 3.11 | active | — | — |

## Workarounds

1. **Use await directly instead of asyncio.run()** (95% success)
   ```
   await some_coroutine()
   ```
2. **Use asyncio.create_task() to schedule the coroutine** (90% success)
   ```
   task = asyncio.create_task(some_coroutine())
await task
   ```

## Dead Ends

- **Using asyncio.get_event_loop().run_until_complete() instead** — This still tries to run a new loop inside an existing one, leading to the same error. (70% fail)
- **Wrapping the call in a thread to avoid loop conflict** — asyncio.run() still needs a loop; running in a thread without proper loop setup may cause other issues. (50% fail)
