{"record":{"id":"6cd7369e8798b27f","repo":"astral-sh/uv","slug":"failed-to-query-ruff-version","errorCode":null,"errorMessage":"Failed to query Ruff version","messagePattern":"Failed to query Ruff version","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/uv/src/commands/project/format.rs","lineNumber":87,"sourceCode":"                        | WorkspaceErrorKind::NonWorkspace(_)\n                ) =>\n            {\n                project_dir.to_owned()\n            }\n            Err(err) => return Err(err.into()),\n        }\n    };\n\n    // Determine the version to use and get the path to Ruff.\n    let ruff_path = if let Some(ruff_path) = ruff_path {\n        if show_version {\n            let output = Command::new(&ruff_path)\n                .arg(\"--version\")\n                .output()\n                .await\n                .context(\"Failed to query Ruff version\")?;\n            if !output.status.success() {\n                anyhow::bail!(\"Failed to query Ruff version\");\n            }\n            write!(\n                printer.stderr(),\n                \"{}\",\n                String::from_utf8_lossy(&output.stdout)\n            )?;\n        }\n        ruff_path\n    } else {\n        let retry_policy = client_builder.retry_policy();\n        // Python downloads are performing their own retries to catch stream errors, disable the\n        // default retries to avoid the middleware from performing uncontrolled retries.\n        let client = client_builder.retries(0).build()?;\n\n        let reporter = BinaryDownloadReporter::single(printer);\n        let bin_version = version\n            .as_deref()\n            .map(BinVersion::from_str)","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/astral-sh/uv/blob/f1a42680ff5272232d65748acf338b19778dde24/crates/uv/src/commands/project/format.rs#L69-L105","documentation":"Error \"Failed to query Ruff version\" thrown in astral-sh/uv.","triggerScenarios":"Thrown at crates/uv/src/commands/project/format.rs:87 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f1a42680ff5272232d65748acf338b19778dde24","analyzedAt":"2026-08-16T04:51:47.599Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}