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

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

## Root Cause

静态文件目录配置错误或文件路径不存在。

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   from starlette.staticfiles import StaticFiles
app.mount('/static', StaticFiles(directory='static'), name='static')
   ```

## Dead Ends

- **** — 在部署时路径会变化，导致失败 (85% fail)
- **** — 会导致前端资源加载失败，用户体验差 (70% fail)
