{"record":{"id":"f9dc5d03f5731bb0","repo":"jdx/mise","slug":"invalid-python-precompiled-arch-arch-this-loo","errorCode":null,"errorMessage":"invalid python.precompiled_arch={arch:?}: this looks like a target triple. Set python.precompiled_arch={precompiled_arch:?} and python.precompiled_os={precompiled_os:?} instead.","messagePattern":"invalid python\\.precompiled_arch=(.+?): this looks like a target triple\\. Set python\\.precompiled_arch=(.+?) and python\\.precompiled_os=(.+?) instead\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/python.rs","lineNumber":1369,"sourceCode":"}\n\nfn python_precompiled_url_path(settings: &Settings) -> String {\n    if cfg!(windows) || cfg!(linux) || cfg!(macos) {\n        format!(\n            \"python-precompiled-{}-{}.gz\",\n            python_arch(settings),\n            python_os(settings)\n        )\n    } else {\n        \"python-precompiled.gz\".into()\n    }\n}\n\nfn validate_python_precompiled_settings(settings: &Settings) -> Result<()> {\n    if let Some(arch) = &settings.python.precompiled_arch\n        && let Some((precompiled_arch, precompiled_os)) = split_python_precompiled_triple(arch)\n    {\n        bail!(\n            \"invalid python.precompiled_arch={arch:?}: this looks like a target triple. \\\n             Set python.precompiled_arch={precompiled_arch:?} and \\\n             python.precompiled_os={precompiled_os:?} instead.\"\n        );\n    }\n    if let Some(arch) = &settings.python.precompiled_arch\n        && looks_like_python_precompiled_os_value(arch)\n    {\n        bail!(\n            \"invalid python.precompiled_arch={arch:?}: this looks like an OS value. \\\n             Use python.precompiled_os={arch:?} instead, and set python.precompiled_arch \\\n             to an architecture such as \\\"x86_64\\\" or \\\"aarch64\\\".\"\n        );\n    }\n    Ok(())\n}\n\nfn split_python_precompiled_triple(value: &str) -> Option<(&str, &str)> {","sourceCodeStart":1351,"sourceCodeEnd":1387,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/plugins/core/python.rs#L1351-L1387","documentation":"mise accepts the settings python.precompiled_arch and python.precompiled_os to override which precompiled python distribution is selected. When python.precompiled_arch is set to an entire target triple like \"x86_64-unknown-linux-gnu\", split_python_precompiled_triple detects it and mise fails fast with a corrective message instead of silently failing to match a distribution.","triggerScenarios":"Setting `python.precompiled_arch = \"x86_64-unknown-linux-gnu\"` (or any value that splits into arch+os as a triple) in settings, then running `mise install python@...`. Also exercised directly by validate_python_precompiled_settings during install and by unit tests.","commonSituations":"Copying a rust-style target triple from CI docs into the arch setting; misunderstanding the setting as a platform string rather than a bare arch.","solutions":["Split the triple across the two settings: set python.precompiled_arch to the arch (e.g. \"x86_64\") and python.precompiled_os to the os (e.g. \"linux\" or \"unknown-linux-gnu\") exactly as the error suggests","Remove python.precompiled_arch entirely if you did not intend a cross/precompiled override"],"exampleFix":"// before\n[python]\nprecompiled_arch = \"x86_64-unknown-linux-gnu\"\n// after\n[python]\nprecompiled_arch = \"x86_64\"\nprecompiled_os = \"unknown-linux-gnu\"","handlingStrategy":"validation","validationCode":"const arch = settings.python?.precompiled_arch;\nif (arch && arch.includes(\"-\")) {\n  throw new Error(`python.precompiled_arch must be a bare arch, got triple '${arch}'; split into precompiled_arch + precompiled_os`);\n}","typeGuard":"const isBareArch = (v) => typeof v === \"string\" && /^[a-z0-9_]+$/.test(v) && !v.includes(\"-\");\n// usage: if (!isBareArch(arch)) reject(...);","tryCatchPattern":null,"preventionTips":["Always set python.precompiled_arch to a bare arch token (x86_64, aarch64) — never a target triple","Put OS components in python.precompiled_os, not in the arch key","Lint mise.toml/settings for hyphenated values in precompiled_arch in CI"],"tags":["python","settings","config-validation"],"backgroundTag":"invalid-config-value","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"}