tonhowtf/omniget · error

nao foi possivel baixar o gallery-dl para este sistema

Error message

nao foi possivel baixar o gallery-dl para este sistema

What it means

install() delegates to ensure_gallerydl(), which attempts to locate or download the gallery-dl binary; when it returns None (download impossible for this platform or network fetch failed), install() converts that into this error. It reports the binary could not be provisioned for the current system.

Solutions

  1. Check network connectivity to the gallery-dl release host and retry
  2. Install gallery-dl manually (pip install gallery-dl or download the standalone binary) and put it in PATH so ensure_gallerydl() finds it
  3. Verify the platform is supported by the downloader (common OS/arch combos)
Defensive patterns

Strategy: retry

Validate before calling

// check availability before install attempt
if which::which("gallery-dl").is_ok() { /* already present */ }

Try / catch

match gallery::install().await {
    Ok(path) => path,
    Err(e) => {
        tokio::time::sleep(Duration::from_secs(5)).await;
        gallery::install().await.map_err(|e2| anyhow!("install retry falhou: {e2}"))?
    }
}

Prevention

When it happens

Trigger: Calling install() when ensure_gallerydl() cannot find an existing gallery-dl and its download step fails — unsupported OS/arch, download URL unreachable, or checksum/disk failure.

Common situations: Offline or firewalled machine blocking the download host; unsupported platform (e.g. unusual Linux arch); antivirus quarantining the downloaded binary.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/46872cea96658b38. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/gallery.rs:31

pub async fn status() -> GalleryStatus {
    let path = crate::core::dependencies::find_tool("gallery-dl").await;
    let version = match &path {
        Some(p) => crate::core::dependencies::check_version_at_path(p, "gallery-dl").await,
        None => None,
    };
    GalleryStatus {
        installed: path.is_some(),
        path: path.map(|p| p.to_string_lossy().to_string()),
        version,
    }
}

pub async fn install() -> anyhow::Result<String> {
    crate::core::dependencies::ensure_gallerydl()
        .await
        .map(|p| p.to_string_lossy().to_string())
        .ok_or_else(|| anyhow!("nao foi possivel baixar o gallery-dl para este sistema"))
}

#[derive(Debug, Clone, Serialize)]
pub struct GalleryResult {
    pub files: Vec<String>,
    pub dest: String,
    pub log_tail: String,
}

pub async fn download(
    url: &str,
    dest: &str,
    cookies_file: Option<&str>,
    progress: super::ProgressFn,
) -> anyhow::Result<GalleryResult> {
    use tokio::io::{AsyncBufReadExt, BufReader};
    let bin = crate::core::dependencies::ensure_gallerydl()
        .await

View on GitHub (pinned to 8600b91f42)