jdx/mise · error
Python lock does not match the requested tool; run `mise…
Error message
Python lock does not match the requested tool; run `mise lock --bump {}` What it means
Before replaying a uv lock, validate_uv_lock checks that the embedded pyproject-style project table still matches what the tool request needs: the dependencies list, the synthetic project name (mise-pypi-tool-environment), and requires-python must line up with the current request. If any differ, the lock is stale relative to the request and mise refuses to install from it, telling you to regenerate it with `mise lock --bump`.
Solutions
- Regenerate the lock: `mise lock --bump <tool>` (as the message suggests).
- Revert manual edits to mise.lock or delete it and run `mise lock` again.
- If you intentionally changed the tool version/extras in mise.toml, re-run lock so the recorded dependencies match.
- Update mise if the lock was written by a much older version with a different project-table schema.
Example fix
// before: mise.toml bumped the tool but the lock still lists the old version ruff = "pipx:0.9" // after: regenerate the lock to match $ mise lock --bump ruff
Defensive patterns
Strategy: validation
Validate before calling
// after editing mise.toml tool versions/extras, re-lock
run('mise lock --bump <tool>'); Prevention
- Always run `mise lock --bump` after changing tool versions or extras
- Never hand-edit mise.lock project tables
- Keep mise updated so lock schema stays consistent
When it happens
Trigger: Thrown from validate_uv_lock (called by prepare_install_version, resolve_uv_lock, install_uv_lock) when the stored UvLock's project.dependencies array differs from the expected dependency built from the request, the project name is not `mise-pypi-tool-environment`, or `requires-python` differs between the project table and the graph.
Common situations: The mise.lock was edited or generated by an older mise version with different lock schema content; the tool version or extras were changed in mise.toml without re-locking; someone hand-edited the lockfile; the lock was produced for a different tool version and needs bumping.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- has a wheel without a SHA256 hash
- Python dependency graphs require lockfile revision 2; run…
- Python lock is missing the requested root package
- Python locks support registry wheels only
- unsupported Python lock project settings
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/0c433ecb590f0d99.
Report an issue: GitHub.
Appendix: source
Thrown at src/backend/pipx/lock.rs:326
}
pub(crate) fn validate_uv_lock(&self, tv: &ToolVersion, lock: &UvLock) -> Result<()> {
self.validate_lock_options(tv)?;
let project = lock
.project
.get("project")
.and_then(toml::Value::as_table)
.ok_or_else(|| eyre!("missing uv project"))?;
let expected = self
.lock_requirements(tv)?
.into_iter()
.map(toml::Value::String)
.collect::<Vec<_>>();
if project.get("dependencies").and_then(toml::Value::as_array) != Some(&expected)
|| project.get("name").and_then(toml::Value::as_str) != Some(PROJECT_NAME)
|| project.get("requires-python") != lock.graph.get("requires-python")
{
bail!(
"Python lock does not match the requested tool; run `mise lock --bump {}`",
self.ba.short
);
}
let packages = lock
.graph
.get("package")
.and_then(toml::Value::as_array)
.ok_or_else(|| eyre!("missing uv packages"))?;
let mut root = false;
let mut virtual_root = false;
for package in packages {
let package = package
.as_table()
.ok_or_else(|| eyre!("invalid uv package"))?;
let name = package
.get("name")
.and_then(toml::Value::as_str)View on GitHub (pinned to 533346cc37)