python
runtime_error
ai_generated
true
ValueError: The name 'auth' is already registered for this blueprint. Use 'name=' to provide a unique name.
ID: python/flask-blueprint-name-collision
80%Fix Rate
87%Confidence
0Evidence
2025-02-10First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 2.x | active | — | — | — |
| 3.x | active | — | — | — |
Root Cause
Registering two blueprints with the same name in the same app.
generic中文
在同一应用中注册了两个同名的蓝图。
Workarounds
-
95% success
bp = Blueprint('auth_v2', __name__) -
90% success
app.register_blueprint(bp, name='auth_v2')
Dead Ends
Common approaches that don't work:
-
60% fail
The blueprint's internal name attribute is what matters, not the variable.
-
90% fail
Name collision still occurs.