# TypeError: render_template() 缺少 1 个必需的位置参数：'template_name_or_list'

- **ID:** `python/flask-typerror-render-template-missing-argument`
- **领域:** python
- **类别:** type_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

调用 render_template 时没有任何参数；至少需要模板名称。

## 版本兼容性

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

## 解决方案

1. **Provide template name as first argument** (95% 成功率)
   ```
   return render_template('index.html', name='Alice')
   ```
2. **Use named arguments** (90% 成功率)
   ```
   return render_template(template_name_or_list='index.html', name='Alice')
   ```

## 无效尝试

- **Passing only context as positional argument** — First argument is template name, not context. (80% 失败率)
- **Using *args incorrectly** — Misunderstanding function signature. (60% 失败率)
