tonhowtf/omniget · warning
Download reported success but no matching file appeared in
Error message
Download reported success but no matching file appeared in {:?}. This can happen on Windows with a non-UTF-8 console locale when the title contains non-Latin characters. Try `chcp 65001` in a terminal before launching the app, or update yt-dlp in Settings → Dependencies. What it means
Raised after yt-dlp exits successfully but the wrapper cannot find a new file matching the expected title in the output directory. The known cause is Windows console encoding: with a non-UTF-8 code page, yt-dlp's output title is mis-decoded so the filename match fails, especially with non-Latin titles.
Solutions
- Run `chcp 65001` in a terminal before launching the app to force UTF-8 console output
- Update yt-dlp in Settings → Dependencies; newer versions write JSON metadata that avoids encoding issues
- Check the output directory for the file under a slightly different (mangled) name
- Set a fixed output template (-o) without title-derived characters to sidestep matching
Example fix
// before
// Windows console in cp936: title 'Видео' garbled, no file matched
// after
// chcp 65001 && app.exe (or update yt-dlp in Settings → Dependencies)
newest.map(|(p, _)| p).ok_or_else(|| anyhow!("Download reported success but no matching file appeared in {:?}.", output_dir)) Defensive patterns
Strategy: fallback
Validate before calling
// Windows only: detect a non-UTF-8 console code page
#[cfg(windows)]
let cp = std::process::Command::new("cmd").args(["/c", "chcp"]).output()?;
let utf8 = String::from_utf8_lossy(&cp.stdout).contains("65001");
if !utf8 { eprintln!("Run 'chcp 65001' before launching to avoid filename mismatches"); } Try / catch
match result {
Err(e) if e.to_string().contains("no matching file appeared") => {
scan_output_dir_for_recent_files(output_dir) // fall back to mtime scan
}
other => other,
} Prevention
- Force UTF-8 console (chcp 65001) on Windows launches
- Read the download filename from yt-dlp's JSON/progress output instead of parsing text
- Scan the output dir by mtime as a fallback
- Keep yt-dlp updated; newer versions emit safer metadata
When it happens
Trigger: `find_newest_matching_file` (ok_or_else at ytdlp.rs:4815) returns None after a successful download: filename mismatch due to console code page mangling non-ASCII titles, or the file landed outside output_dir.
Common situations: Windows machines with legacy locales (cp936/cp1251 etc.), downloads of videos with Cyrillic/CJK/Arabic titles, or custom output templates changing the filename.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- is in use by another process ( ). Wait for active downloads…
- Failed to replace
- Console encoding error (non-UTF-8 locale). Update yt-dlp in…
- pasta de origem não encontrada
- não achei nenhum StreamingHistory_*.json /…
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/9be194b2c48e6926.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/ytdlp.rs:4815
}
if let Ok(meta) = entry.metadata() {
if meta.len() == 0 {
continue;
}
if let Ok(modified) = meta.modified() {
if now.duration_since(modified).unwrap_or_default() < fallback_limit {
if newest.as_ref().map_or(true, |(_, t)| modified > *t) {
newest = Some((path, modified));
}
}
}
}
}
}
newest
.map(|(p, _)| p)
.ok_or_else(|| anyhow!(
"Download reported success but no matching file appeared in {:?}. \
This can happen on Windows with a non-UTF-8 console locale when the title contains non-Latin characters. \
Try `chcp 65001` in a terminal before launching the app, or update yt-dlp in Settings → Dependencies.",
output_dir
))
}
pub fn parse_formats(json: &serde_json::Value) -> Vec<FormatInfo> {
let formats = match json.get("formats").and_then(|v| v.as_array()) {
Some(f) => f,
None => return Vec::new(),
};
let mut result = Vec::new();
for f in formats {
let format_id = match f.get("format_id").and_then(|v| v.as_str()) {
Some(id) => id.to_string(),
None => continue,View on GitHub (pinned to 8600b91f42)