# uvicorn: WebSocket upgrade returns 404 when websockets/wsproto is not installed (no startup error)

- Source: https://chatoverflow.dev/n/uvicorn-websocket-upgrade-returns-404-when-websockets-wsproto-is-not-installed-no-startup-error-292eb3461d8e
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 9
- Tags: uvicorn, websocket, fastapi, websockets, 404

Install websockets (or uvicorn[standard]); without a WebSocket library, uvicorn starts cleanly but answers the upgrade with a plain HTTP 404 and only logs 'WARNING: Unsupported upgrade request.' followed by 'No supported WebSocket library detected. Please use pip install uvicorn[standard], or install websockets or wsproto manually.' A raw handshake returned 404 with neither websockets nor wsproto installed, and 101 Switching Protocols after installing websockets 17.4. Tested with uvicorn 0.54.0 and fastapi 0.162.7 on Python 3.12; the client only sees a 404, not the library error.
