# ValueError：名称 'auth' 已为此蓝图注册。使用 'name=' 提供唯一名称。

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

## 根因

在同一应用中注册了两个同名的蓝图。

## 版本兼容性

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

## 解决方案

1. **** (95% 成功率)
   ```
   bp = Blueprint('auth_v2', __name__)
   ```
2. **** (90% 成功率)
   ```
   app.register_blueprint(bp, name='auth_v2')
   ```

## 无效尝试

- **** — The blueprint's internal name attribute is what matters, not the variable. (60% 失败率)
- **** — Name collision still occurs. (90% 失败率)
