tonhowtf/omniget · error · anyhow::Error
a Microsoft não publica ONNX Runtime pronto para este…
Error message
a Microsoft não publica ONNX Runtime pronto para este sistema; instale a partir de um arquivo local (pacote `onnxruntime` do pip, por exemplo)
What it means
When no explicit variant is requested, pick_asset calls auto_variant_id() to detect the current OS/arch; if no prebuilt Microsoft ONNX Runtime asset matches this platform, it returns this error telling the user to install a local build (e.g. the pip `onnxruntime` package) rather than downloading something unsupported.
Solutions
- Run on a supported platform (Windows x64, macOS x64/arm64, Linux x64/arm64 with common glibc)
- Install ONNX Runtime locally (pip install onnxruntime) and point the app at the local install instead of downloading
- Set an explicit variant id that has a catalog asset for a compatible platform
- Contribute/add an asset entry to the catalog for the target platform
Example fix
// unsupported platform (e.g. Alpine musl) # fix: provide local runtime pip install onnxruntime # then configure app to use local onnxruntime instead of auto-install
Defensive patterns
Strategy: fallback
Validate before calling
// check platform support before attempting auto install
if onnxrt::auto_variant_id().is_none() {
eprintln!("no prebuilt ONNX Runtime for this platform; install locally via pip");
} Try / catch
match onnxrt::install_runtime(None) {
Err(e) if e.to_string().contains("não publica ONNX Runtime") => {
// use a locally installed runtime instead of downloading
use_local_onnx_runtime_from_pip()?;
}
other => other?,
} Prevention
- Document supported platforms and check them at app startup
- Bundle or detect a local pip onnxruntime as fallback on exotic platforms
- Show the informative error text to the user instead of a generic failure
- Keep the asset catalog updated as new platform targets are added
When it happens
Trigger: install_runtime called with variant None/"auto"/empty on a system whose OS/arch/libc combo has no entry in the asset catalog — auto_variant_id() returns None.
Common situations: Unsupported targets: FreeBSD, musl/Alpine, exotic Linux archs (riscv64, armv7), very old glibc, or Windows-on-ARM without a matching asset.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- FFmpeg installed but failed to execute
- FFmpeg installed but failed to execute
- gallery-dl nao tem binario para este sistema
- variante de ONNX Runtime desconhecida
- variante sumiu do catálogo
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/08c041a05e4c3795.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/onnxrt.rs:167
recommended: Some(a.id) == auto,
})
.collect()
}
fn asset_by_id(id: &str) -> Option<&'static Asset> {
ASSETS.iter().find(|a| a.id == id)
}
fn pick_asset(variant: Option<&str>) -> anyhow::Result<&'static Asset> {
let wanted = variant
.map(|s| s.trim())
.filter(|s| !s.is_empty() && *s != "auto");
if let Some(id) = wanted {
return asset_by_id(id)
.ok_or_else(|| anyhow!("variante de ONNX Runtime desconhecida: {id}"));
}
let auto = auto_variant_id().ok_or_else(|| {
anyhow!(
"a Microsoft não publica ONNX Runtime pronto para este sistema; \
instale a partir de um arquivo local (pacote `onnxruntime` do pip, por exemplo)"
)
})?;
asset_by_id(auto).ok_or_else(|| anyhow!("variante {auto} sumiu do catálogo"))
}
pub fn target_dir() -> Option<PathBuf> {
crate::core::paths::app_data_dir().map(|d| d.join("onnxruntime"))
}
pub fn target_path() -> Option<PathBuf> {
target_dir().map(|d| d.join(lib_filename()))
}
pub fn version_marker_path() -> Option<PathBuf> {
target_dir().map(|d| d.join("onnxruntime.version"))
}View on GitHub (pinned to 8600b91f42)