tonhowtf/omniget · error
nao sei exportar
Error message
nao sei exportar {} What it means
X archive export matches a requested dataset key against a fixed set (followers, following, not_following_back, fans, blocked, muted). Any other key falls into the catch-all arm and errors with 'nao sei exportar <key>', i.e. the requested export type is not implemented for X archives.
Solutions
- Use one of the supported kinds exactly: followers, following, not_following_back, fans, blocked, muted.
- Check the frontend constant/enum against the backend match arms and fix the mismatch.
- Trim/lowercase user-supplied kind strings before calling export.
- Add a new match arm in export if the dataset genuinely needs support.
Example fix
// before export(kind = "follower") // -> nao sei exportar follower // after export(kind = "followers")
Defensive patterns
Strategy: validation
Validate before calling
const VALID_KINDS = ["followers","following","not_following_back","fans","blocked","muted"];
if (!VALID_KINDS.includes(kind)) throw new Error(`unsupported export kind: ${kind}`); Type guard
fn is_valid_export_kind(k: &str) -> bool {
matches!(k, "followers" | "following" | "not_following_back" | "fans" | "blocked" | "muted")
} Prevention
- Share a single enum/constant list of kinds between frontend and backend.
- Normalize (trim/lowercase) user-provided kind strings.
- Drive the UI options from the backend's supported kinds.
- Add a test covering every supported kind string.
When it happens
Trigger: Calling export with a kind string not in the match list — typos ('follower', 'mutuals'), invented kinds, or kinds supported for other platforms but not X.
Common situations: Frontend sends a hardcoded kind that drifted from backend enum; user picks an unsupported list; localized key names passed through from UI.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- formato desconhecido
- formato desconhecido
- formato desconhecido
- variante de ONNX Runtime desconhecida
- nenhuma chave selecionada
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/5ea671cea24ccf46.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/x/archive.rs:533
_ => {
l.likes
.iter()
.map(|k| format!("- {}\n {}", k.text.replace('\n', " "), k.url))
.collect::<Vec<_>>()
.join("\n")
+ "\n"
}
};
std::fs::write(&file, content)?;
Ok(file.to_string_lossy().to_string())
}
"followers" => accounts(&l.followers),
"following" => accounts(&l.following),
"not_following_back" => accounts(&l.summary.not_following_back),
"fans" => accounts(&l.summary.fans),
"blocked" => accounts(&l.blocked),
"muted" => accounts(&l.muted),
other => Err(anyhow!("nao sei exportar {}", other)),
}
}
View on GitHub (pinned to 8600b91f42)