# FileNotFoundError: [Errno 2] No such file or directory: 'static/style.css'

- **ID:** `python/starlette-missing-static-files`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Starlette static file mount expects the directory to exist; if the file is missing or path is incorrect, this error occurs.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **Create the static directory and place files** (100% success)
   ```
   mkdir -p static
# place style.css in static/
   ```
2. **Mount static files with correct path** (95% success)
   ```
   from starlette.staticfiles import StaticFiles
app.mount('/static', StaticFiles(directory='static'), name='static')
   ```

## Dead Ends

- **Using a relative path that doesn't exist** — The path must be absolute or relative to the current working directory. (90% fail)
- **Not mounting the static files at all** — Static files won't be served. (100% fail)
