tonhowtf/omniget · error · anyhow::Error

gallery-dl is not available. Install gallery-dl to download…

Error message

gallery-dl is not available. Install gallery-dl to download from this site.

What it means

`ensure_gallerydl()` returned None, meaning the gallery-dl binary could not be located, installed, or updated. The gallery download path requires this external tool, so the operation is aborted with an installation hint.

Solutions

  1. Install gallery-dl (`pip install gallery-dl` or download the standalone binary) and put it on PATH.
  2. Verify with `gallery-dl --version` in the environment where the app runs.
  3. Check network access and proxy settings if relying on the ensure/auto-download mechanism.
  4. Ensure the install/cache directory used by ensure_gallerydl is writable.
Defensive patterns

Strategy: fallback

Validate before calling

// Rust, before calling download
if omniget_core::core::dependencies::ensure_gallerydl().await.is_none() {
    return Err(anyhow!("gallery-dl is required; install it with 'pip install gallery-dl'"));
}

Try / catch

// Rust
let bin = match ensure_gallerydl().await {
    Some(b) => b,
    None => {
        log::warn!("gallery-dl missing; trying managed install");
        install_gallerydl().await? // fallback auto-install
    }
};

Prevention

When it happens

Trigger: Calling gallerydl `download` when `ensure_gallerydl()` cannot find gallery-dl on PATH and its ensure/auto-install step fails (no network, unsupported platform, or install location not writable).

Common situations: gallery-dl never installed (it is not bundled), installed via pip into a venv not on the app's PATH, auto-update blocked by firewall/no network, or a read-only app data directory preventing the managed install.

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/07f3d6ae3417390c. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/src/platforms/gallerydl/mod.rs:203

        })
    }

    async fn download(
        &self,
        info: &MediaInfo,
        opts: &DownloadOptions,
        progress: mpsc::Sender<ProgressUpdate>,
    ) -> anyhow::Result<DownloadResult> {
        let url = info
            .available_qualities
            .first()
            .map(|q| q.url.clone())
            .ok_or_else(|| anyhow!("No gallery URL available"))?;

        let bin = omniget_core::core::dependencies::ensure_gallerydl()
            .await
            .ok_or_else(|| {
                anyhow!(
                    "gallery-dl is not available. Install gallery-dl to download from this site."
                )
            })?;

        std::fs::create_dir_all(&opts.output_dir)?;
        let _ = progress.send(ProgressUpdate::percent(-2.0)).await;

        let mut cmd = omniget_core::core::process::command(&bin);
        cmd.arg("--no-colors")
            .arg("-D")
            .arg(&opts.output_dir)
            .stdout(Stdio::piped())
            .stderr(Stdio::piped());

        if let Some(data_dir) = omniget_core::core::paths::app_data_dir() {
            let archive_dir = data_dir.join("archive");
            if std::fs::create_dir_all(&archive_dir).is_ok() {
                cmd.arg("--download-archive")

View on GitHub (pinned to 8600b91f42)