# Werkzeug异常：未找到404：请求的URL在服务器上未找到

- **ID:** `python/flask-static-file-not-found`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

Flask找不到静态文件，因为文件缺失或URL路径错误。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **Place the file in the 'static' folder and use correct URL** (95% 成功率)
   ```
   mkdir static
mv style.css static/
# Access via /static/style.css
   ```
2. **Configure custom static folder** (90% 成功率)
   ```
   app = Flask(__name__, static_folder='assets')
   ```

## 无效尝试

- **Placing static files in the templates folder** — Flask serves static files from a 'static' folder by default. (80% 失败率)
- **Using absolute path in the URL** — Flask expects relative paths from the static folder. (75% 失败率)
