{"record":{"id":"a0a7d2d66b37c5da","repo":"jdx/mise","slug":"has-a-uv-dependency-graph-use-uv-with-a-pypi-package-to","errorCode":null,"errorMessage":"{} has a uv dependency graph; use uv with a PyPI package to replay it","messagePattern":"(.+?) has a uv dependency graph; use uv with a PyPI package to replay it","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/pipx/lock.rs","lineNumber":68,"sourceCode":"\n    pub(super) fn uv_lock_options_supported(&self, tv: &ToolVersion) -> bool {\n        let raw = tv.request.options();\n        let opts = PipxOptions::new(&raw);\n        [opts.uvx_args(), opts.pipx_args()]\n            .into_iter()\n            .flatten()\n            .all(|s| s.trim().is_empty())\n    }\n\n    pub(super) fn validate_lock_options(&self, tv: &ToolVersion) -> Result<()> {\n        if !self.uv_lock_options_supported(tv) {\n            bail!(\n                \"{} dependency locking does not support uvx_args or pipx_args\",\n                self.ba.short\n            );\n        }\n        if !self.uv_lock_allowed(tv) {\n            bail!(\n                \"{} has a uv dependency graph; use uv with a PyPI package to replay it\",\n                self.ba.short\n            );\n        }\n        Ok(())\n    }\n\n    async fn lock_uv_program(&self, config: &Arc<Config>) -> Result<PathBuf> {\n        let uv = self.spawnable_dependency(config, None, \"uv\").await\n            .ok_or_else(|| eyre!(\"Python dependency locks require uv >= {MIN_UV_VERSION}; install it with `mise use uv`\"))?;\n        let output = CmdLineRunner::new(&uv).arg(\"--version\").read().await?;\n        let version = output\n            .split_whitespace()\n            .nth(1)\n            .ok_or_else(|| eyre!(\"cannot determine uv version\"))?;\n        if semver_is_older_than(version, MIN_UV_VERSION).unwrap_or(true) {\n            bail!(\"Python dependency locks require uv >= {MIN_UV_VERSION}\");\n        }","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/pipx/lock.rs#L50-L86","documentation":"validate_lock_options refuses a plain-pipx operation when the tool's lock entry contains a uv dependency graph (uv_lock_allowed returns false). The graph was produced by uv against a PyPI package and can only be replayed with uv; proceeding with pipx would ignore the recorded dependencies.","triggerScenarios":"Installing or resolving a pipx tool whose lock entry has a uv dependency graph while the current operation is not uv/PyPI-based (e.g. pipx fallback install because uv is missing or uvx disabled), from prepare_install_version, resolve_uv_lock, or validate_uv_lock.","commonSituations":"uv was upgraded away or uvx disabled after locking, so install falls back to pipx; running on a machine without uv while the repo's mise.lock carries a uv-built graph.","solutions":["Install/enable uv (`mise use uv@latest`, keep uvx enabled) so the graph can be replayed with uv","Run `mise lock` after switching backends to regenerate the lock without the uv graph","Delete the stale lock entry for the tool and reinstall if you intentionally want pipx-only resolution"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (lockEntry.hasUvGraph && !(await isInstalled(\"uv\")))\n  throw new Error(\"lock has a uv graph; install uv or regenerate the lock\");","typeGuard":null,"tryCatchPattern":"try { await $`mise install pipx:ruff` } catch (e) {\n  if (/use uv with a PyPI package/.test(e.message)) { await $`mise use uv@latest`; await $`mise install pipx:ruff`; }\n  else throw e;\n}","preventionTips":["Keep uv installed on every machine/CI image consuming the repo's mise.lock","Run `mise lock` after intentionally switching a tool away from uv","Don't mix pipx fallback installs with uv-generated lock entries in one environment"],"tags":["pipx","uv","lockfile","backend-mismatch"],"backgroundTag":"incompatible-source-type","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}