astral-sh/uv · error

No files found in the Gist

Error message

No files found in the Gist

What it means

Error "No files found in the Gist" thrown in astral-sh/uv.

Source

Thrown at crates/uv/src/commands/project/run.rs:1967

    response.error_for_status_ref()?;

    // Parse the response
    let gist_data: GistResponse = response.json().await?;

    // Get the raw URL of the first `.py` file (or just the first file).
    let raw_url = gist_data
        .files
        .iter()
        .filter(|(name, _)| {
            Path::new(name)
                .extension()
                .is_some_and(|ext| ext.eq_ignore_ascii_case("py"))
        })
        .map(|(_, file)| &file.raw_url)
        .next()
        // If no `.py` file is found, use the first file.
        .or_else(|| gist_data.files.values().next().map(|file| &file.raw_url))
        .ok_or_else(|| anyhow!("No files found in the Gist"))?;

    let url = DisplaySafeUrl::parse(raw_url)?;

    Ok(url)
}

/// Returns `true` if the target is a ZIP archive containing a `__main__.py` file.
fn is_python_zipapp(target: &Path) -> bool {
    if let Ok(file) = fs_err::File::open(target) {
        let reader = std::io::BufReader::new(file);
        return futures::executor::block_on(async {
            let archive = async_zip::base::read::seek::ZipFileReader::new(
                futures::io::AllowStdIo::new(reader),
            )
            .await
            .ok()?;
            archive
                .file()

View on GitHub (pinned to f1a42680ff)

When it happens

Trigger: Thrown at crates/uv/src/commands/project/run.rs:1967 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of astral-sh/uv@f1a42680ff (2026-08-16). Data as JSON: /api/errors/6b9565c893fee611. Report an issue: GitHub.