Skip to content

"reflex db init" without the db extra dumps a raw click traceback instead of the guided "pip install reflex[db]" message #7259

Description

@masenf

Describe the bug

#7083 added the guided ImportError ("pip install reflex[db]") when rx.Model is subclassed without the db extra, but the CLI path did not get it: on a bare reflex install, reflex db init exits 1 with a 35-line raw click traceback ending in the underlying ModuleNotFoundError.

To Reproduce

uv venv && uv pip install reflex          # no [db] extra
reflex init --template blank
reflex db init

Observed behavior

Raw traceback, exit code 1.

Expected behavior

The same guided message the model path prints, exit code 1.

Specifics

  • Reflex 0.9.12a1; pre-existing, identical on 0.9.11.post1
  • Python 3.11.15, Linux

Additional context

0.9.12a1 pre-release QA, db_optional_imports cluster, anomaly A2, confirmed by an adversarial verifier (LOW). Evidence: db_optional_imports/ (bareapp/, NOTES.md).

Activity

  1. added theissue type on Sep 22, 2026
  2. linear-code commented on Sep 22, 2026

    @linear-code
  3. added a commit that references this issue on Oct 5, 2026
    8ee5d41
  4. added
    release-train
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    release-train

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions