{"record":{"id":"6b9565c893fee611","repo":"astral-sh/uv","slug":"no-files-found-in-the-gist","errorCode":null,"errorMessage":"No files found in the Gist","messagePattern":"No files found in the Gist","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/uv/src/commands/project/run.rs","lineNumber":1967,"sourceCode":"    response.error_for_status_ref()?;\n\n    // Parse the response\n    let gist_data: GistResponse = response.json().await?;\n\n    // Get the raw URL of the first `.py` file (or just the first file).\n    let raw_url = gist_data\n        .files\n        .iter()\n        .filter(|(name, _)| {\n            Path::new(name)\n                .extension()\n                .is_some_and(|ext| ext.eq_ignore_ascii_case(\"py\"))\n        })\n        .map(|(_, file)| &file.raw_url)\n        .next()\n        // If no `.py` file is found, use the first file.\n        .or_else(|| gist_data.files.values().next().map(|file| &file.raw_url))\n        .ok_or_else(|| anyhow!(\"No files found in the Gist\"))?;\n\n    let url = DisplaySafeUrl::parse(raw_url)?;\n\n    Ok(url)\n}\n\n/// Returns `true` if the target is a ZIP archive containing a `__main__.py` file.\nfn is_python_zipapp(target: &Path) -> bool {\n    if let Ok(file) = fs_err::File::open(target) {\n        let reader = std::io::BufReader::new(file);\n        return futures::executor::block_on(async {\n            let archive = async_zip::base::read::seek::ZipFileReader::new(\n                futures::io::AllowStdIo::new(reader),\n            )\n            .await\n            .ok()?;\n            archive\n                .file()","sourceCodeStart":1949,"sourceCodeEnd":1985,"githubUrl":"https://github.com/astral-sh/uv/blob/f1a42680ff5272232d65748acf338b19778dde24/crates/uv/src/commands/project/run.rs#L1949-L1985","documentation":"Error \"No files found in the Gist\" thrown in astral-sh/uv.","triggerScenarios":"Thrown at crates/uv/src/commands/project/run.rs:1967 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"}