{"record":{"id":"2428c6c1b967d8a2","repo":"jdx/mise","slug":"invalid-python-precompiled-arch-arch-this-loo-2428c6","errorCode":null,"errorMessage":"invalid python.precompiled_arch={arch:?}: this looks like an OS value. Use python.precompiled_os={arch:?} instead, and set python.precompiled_arch to an architecture such as \"x86_64\" or \"aarch64\".","messagePattern":"invalid python\\.precompiled_arch=(.+?): this looks like an OS value\\. Use python\\.precompiled_os=(.+?) instead, and set python\\.precompiled_arch to an architecture such as \"x86_64\" or \"aarch64\"\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/python.rs","lineNumber":1366,"sourceCode":"    } 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)> {\n    [\"-unknown-linux\", \"-apple-darwin\", \"-pc-windows\"]\n        .iter()\n        .find_map(|os_marker| {\n            let index = value.find(os_marker)?;\n            (index > 0).then(|| (&value[..index], &value[index + 1..]))\n        })\n}\n\nfn looks_like_python_precompiled_os_value(value: &str) -> bool {","sourceCodeStart":1348,"sourceCodeEnd":1384,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/plugins/core/python.rs#L1348-L1384","documentation":"Companion validation: python.precompiled_arch must be an architecture, not an OS name. If the value looks like an OS (linux, macos, windows...), mise rejects it and directs you to python.precompiled_os, suggesting arch values like x86_64 or aarch64.","triggerScenarios":"Setting `python.precompiled_arch = \"linux\"` (or macos/windows) and then installing python; validated by validate_python_precompiled_settings during install.","commonSituations":"Swapping the two settings by mistake; documentation confusion about which of precompiled_arch / precompiled_os takes which value.","solutions":["Move the OS value to python.precompiled_os and set python.precompiled_arch to an architecture like x86_64 or aarch64","Unset both settings to fall back to auto-detection"],"exampleFix":"// before\nmise settings set python.precompiled_arch linux\n\n// after\nmise settings set python.precompiled_arch x86_64\nmise settings set python.precompiled_os linux","handlingStrategy":"validation","validationCode":"arch=$(mise settings get python.precompiled_arch 2>/dev/null || true)\ncase \"$arch\" in linux|macos|windows|darwin) echo \"OS value in precompiled_arch; move it to precompiled_os\";; esac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep arch=architecture, os=OS; check both settings after copy-pasting config","Prefer unsetting both and letting mise auto-detect the platform","Validate settings with `mise settings` after edits"],"tags":["python","settings","validation","config-mistake"],"backgroundTag":"invalid-config-value","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}