qbraid_core.services.projects.ProjectPythonMismatchError
- exception qbraid_core.services.projects.ProjectPythonMismatchError(environments)
A required environment needs another Python, or platform, than this machine runs.
Raised by
prepare_projectbefore any clone, download, directory or receipt write when no usablepython_choicewas given for such an environment. Ask the person which option to use, then prepare again withpython_choiceset to one ofoptions(for every environment) or to a{slug: option}mapping.Options:
"install_python": get the environment’s Python from uv’s managed Pythons (uv python install) and install the reviewed archive against it. Offered only when uv is available and the platform matches."rebuild": create a fresh environment on this machine’s running Python and install the environment’s declared packages from the package index. Offered only when the environment declares a valid package list the person can be shown in full (seerebuildLimitsinto_dict()); an environment past those limits haspackagesOverLimit: trueand a rebuild choice for it is refused with this error.
An empty
optionslist is a plain refusal. Either way, retrying the same call can never succeed, so callers should not offer a retry: offeroptionsinstead (likeProjectSetupUnavailableError). A subclass ofProjectInstallErrorso existing handlers keep catching it.