# ImportError: cannot import name 'bp' from partially initialized module 'app.routes' (most likely due to a circular import)

- **ID:** `python/flask-circular-import-blueprint`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Two modules import each other, often app -> routes -> app for `app` object or blueprint registration.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 2.x | active | — | — |
| 3.x | active | — | — |

## Workarounds

1. **** (93% success)
   ```
   def create_app():\n    app = Flask(__name__)\n    from .routes import bp\n    app.register_blueprint(bp)\n    return app
   ```
2. **** (88% success)
   ```
   def register():\n    from .routes import bp\n    app.register_blueprint(bp)
   ```

## Dead Ends

- **** — Still executed at import time; cycle remains. (65% fail)
- **** — Cycle is structural, not naming. (90% fail)
