tonhowtf/omniget · error
Nenhum URL de imagem
Error message
Nenhum URL de imagem
What it means
native_download fails when the Reddit media info has an empty available_qualities list for a Photo post. `.first()` returns None, so the code short-circuits with this anyhow error instead of panicking. It indicates Reddit returned metadata but no downloadable image URL/quality entries.
Solutions
- Re-fetch media info; transient parser/CDN issues may resolve
- Verify the post URL is a real photo post and still publicly available
- Update the Reddit scraper/parser to handle the current Reddit response shape
- Check logs of available_qualities for the post to confirm it is genuinely empty
Example fix
let quality = info.available_qualities.first().ok_or_else(|| anyhow!("Nenhum URL de imagem"))?;
// after (with fallback)
let quality = info.available_qualities.first().with_context(|| format!("Nenhum URL de imagem para post {}", info.title))?; Defensive patterns
Strategy: validation
Validate before calling
if info.available_qualities.is_empty() {
return Err(format!("post '{}' has no downloadable image qualities", info.title));
} Prevention
- Check available_qualities is non-empty before calling native_download for photos
- Validate media info right after parsing, not at download time
- Log parsed qualities to detect parser regressions early
When it happens
Trigger: Downloading a Reddit photo post whose info resolution succeeded but produced no qualities (e.g. deleted/removed media, gallery item stripped, or parser failed to extract any format entries).
Common situations: Posts removed by moderators, images hosted on a CDN that returned an error page parsed as valid info, or Reddit API shape changes that leave available_qualities empty.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- Unsupported media type
- o post não veio na resposta (apagado, privado ou id errado)
- cole o link de um post do Reddit, de um i.redd.it ou de um…
- o link curto não levou a um post
- isto é um sub ou um perfil: cole o link de um post
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/7250e1374f01ba4d.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/platforms/reddit/mod.rs:706
url,
&output,
progress,
Some(&opts.cancel_token),
)
.await?;
Ok(DownloadResult {
file_path: output,
file_size_bytes: bytes,
duration_seconds: 0.0,
torrent_id: None,
})
}
MediaType::Photo => {
let quality = info
.available_qualities
.first()
.ok_or_else(|| anyhow!("Nenhum URL de imagem"))?;
let ext = &quality.format;
let output = opts.output_dir.join(format!(
"{}.{}",
sanitize_filename::sanitize(&info.title),
ext
));
let bytes = direct_downloader::download_direct(
&self.client,
&quality.url,
&output,
progress,
Some(&opts.cancel_token),
)
.await?;
Ok(DownloadResult {
file_path: output,
file_size_bytes: bytes,View on GitHub (pinned to 8600b91f42)