tonhowtf/omniget · critical
o gallery-dl não está instalado e não foi possível baixá-lo
Error message
o gallery-dl não está instalado e não foi possível baixá-lo
What it means
The tumblr gdl module relies on an external gallery-dl binary. binary() calls ensure_gallerydl(), which tries to locate or download the tool; if it returns None, this error is thrown because nothing can proceed without the executable. It applies to both dump() (listing) and download() (fetching media).
Solutions
- Install gallery-dl manually (pip install gallery-dl or download the standalone binary) and put it on PATH
- Check network connectivity so ensure_gallerydl() can download it automatically
- Verify the install location used by ensure_gallerydl is writable and not blocked by antivirus
- Confirm the binary runs (gallery-dl --version) from a shell
Example fix
// before
// gallery-dl not installed, offline environment
let dump = gdl::dump(&url, cookies, limit).await?;
// after
match gdl::dump(&url, cookies, limit).await {
Ok(d) => d,
Err(e) if e.to_string().contains("gallery-dl") => {
install_gallerydl().await?; // user-side remediation
gdl::dump(&url, cookies, limit).await?
}
Err(e) => return Err(e),
} Defensive patterns
Strategy: fallback
Validate before calling
which gallery-dl >/dev/null 2>&1 || pip show gallery-dl >/dev/null 2>&1 || { echo 'instale o gallery-dl antes de usar'; exit 1; } Try / catch
match gdl::dump(&url, cookies, limit).await {
Ok(d) => d,
Err(e) if e.to_string().contains("não está instalado") => {
eprintln!("Instale: pip install gallery-dl");
std::process::exit(2);
}
Err(e) => return Err(e),
} Prevention
- Install gallery-dl as part of environment setup
- Run gallery-dl --version in a preflight check at app startup
- Ensure network access to the download mirror used by ensure_gallerydl
When it happens
Trigger: gallery-dl is not on PATH and the automatic download path failed (network error, unsupported platform, no writable install location), making ensure_gallerydl() return None before dump() or download() is called.
Common situations: Fresh machine without gallery-dl installed; offline environment blocks the auto-download; gallery-dl installed under a name not on PATH; Python runtime missing for the pip-installed variant; antivirus or permissions blocked 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
- o yt-dlp não está disponível
- gallery-dl is not available. Install gallery-dl to download…
- Download cancelled
- yt-dlp not found in PATH or app data dir
- xclip not found
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/b21f8e9f9812f009.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/tumblr/gdl.rs:233
return Ok(None);
}
let dir = super::super::temp_dir();
std::fs::create_dir_all(&dir)?;
let path = dir.join(format!("gdl-cookies-{}.txt", uuid::Uuid::new_v4()));
std::fs::write(&path, filtered)?;
Ok(Some(CookieFile { path }))
}
// ───────────────────────── processo ─────────────────────────
fn range_arg(limit: Option<u64>) -> Option<String> {
limit.filter(|n| *n > 0).map(|n| format!("1-{}", n))
}
async fn binary() -> Result<PathBuf> {
crate::core::dependencies::ensure_gallerydl()
.await
.ok_or_else(|| anyhow!("o gallery-dl não está instalado e não foi possível baixá-lo"))
}
/// `gallery-dl -j <url>`: só lista, não baixa nada.
pub async fn dump(
url: &str,
cookies: Option<&Path>,
limit: Option<u64>,
extra: &[String],
progress: &super::super::ProgressFn,
id: &str,
) -> Result<Vec<Entry>> {
use tokio::io::AsyncReadExt;
let bin = binary().await?;
let mut cmd = crate::core::process::command(&bin);
cmd.arg("-j");
if let Some(r) = range_arg(limit) {
cmd.args(["--range", &r]);View on GitHub (pinned to 8600b91f42)