# aiohttp.client_exceptions.ClientHttpVersionError: Invalid HTTP version: HTTP/2

- **ID:** `python/aiohttp-client-connector-http-version-error`
- **Domain:** python
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The server uses HTTP/2, but aiohttp is configured to use HTTP/1.1 only, or vice versa.

## Version Compatibility

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

## Workarounds

1. **Enable HTTP/2 support with aiohttp** (90% success)
   ```
   import aiohttp
async with aiohttp.ClientSession(http2=True) as session:
    async with session.get(url) as resp:
   ```
2. **Use a custom connector with HTTP/2 enabled** (85% success)
   ```
   connector = aiohttp.TCPConnector(force_close=True, http2=True)
async with aiohttp.ClientSession(connector=connector) as session:
   ```

## Dead Ends

- **Disabling HTTP/2 support entirely** — Some servers require HTTP/2 for optimal performance or functionality. (40% fail)
- **Manually setting the HTTP version in headers** — The HTTP version is negotiated at the protocol level, not via headers. (60% fail)
