# 断言错误：蓝图 'auth' 已经注册

- **ID:** `python/flask-blueprint-registration-error`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

同一个蓝图对象被多次注册到应用程序。

## 版本兼容性

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

## 解决方案

1. **Ensure the blueprint is registered only once.** (95% 成功率)
   ```
   app.register_blueprint(auth_bp)  # Call once
   ```
2. **Create a new Blueprint instance for each registration if needed.** (85% 成功率)
   ```
   auth_bp2 = Blueprint('auth2', __name__)
app.register_blueprint(auth_bp2)
   ```

## 无效尝试

- **Registering the blueprint again with a different name.** — The Blueprint object itself is already registered; a new instance is needed. (80% 失败率)
- **Ignoring the error and continuing.** — The app will not start correctly. (90% 失败率)
