# 断言错误：蓝图不能注册多次。

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

## 根因

在Flask应用中重复注册同一个蓝图实例。

## 版本兼容性

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

## 解决方案

1. **** (95% 成功率)
   ```
   只注册一次：
from blueprints import auth_bp
app.register_blueprint(auth_bp)
# 不要再次注册
   ```
2. **** (90% 成功率)
   ```
   每次创建新实例：
auth_bp = Blueprint('auth', __name__)
app.register_blueprint(auth_bp)
   ```

## 无效尝试

- **** — 尝试创建新蓝图但使用了相同名称。 (60% 失败率)
- **** — 在多个文件中导入并注册同一蓝图。 (80% 失败率)
