# concurrent.futures.CancelledError: Future was cancelled

- **ID:** `python/asyncio-cancel-future`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Awaiting a future that has been cancelled, often due to a parent task being cancelled.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.7 | active | — | — |
| 3.8 | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   if not fut.cancelled(): await fut
   ```
2. **** (95% success)
   ```
   try: await fut except asyncio.CancelledError: raise
   ```

## Dead Ends

- **** — Swallowing cancellation can lead to inconsistent state and resource leaks. (70% fail)
- **** — result() raises the same error; it's not a proper fix. (80% fail)
