python config_error ai_generated true

AssertionError: Blueprint 'auth' is already registered

ID: python/flask-blueprint-registration-error

Also available as: JSON · Markdown · 中文
80%Fix Rate
85%Confidence
0Evidence
2025-10-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.x active

Root Cause

The same Blueprint object is registered multiple times with the app.

generic

中文

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

Workarounds

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

Dead Ends

Common approaches that don't work:

  1. Registering the blueprint again with a different name. 80% fail

    The Blueprint object itself is already registered; a new instance is needed.

  2. Ignoring the error and continuing. 90% fail

    The app will not start correctly.