# SyntaxError: 'await' outside async function

- **ID:** `python/asyncio-await-outside-async`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Using await at module level or inside a non-async def; await is only valid inside async def (or top-level in a notebook/repl with special support).

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.5+ | active | — | — |

## Workarounds

1. **** (97% success)
   ```
   import asyncio

async def main():
    await some_coro()

asyncio.run(main())
   ```
2. **** (93% success)
   ```
   import asyncio
result = asyncio.run(some_coro())
   ```

## Dead Ends

- **** — This is a parser-level SyntaxError, not a type error; comments cannot suppress it. (95% fail)
- **** — SyntaxError occurs at compile time before any except block is entered. (95% fail)
