tonhowtf/omniget · error

nao achei o caminho do export

Error message

nao achei o caminho do export: {}

What it means

Source::open is the entry point for ingesting a LinkedIn data export (a zip or an extracted directory). Before doing any parsing it checks Path::exists on the user-supplied path; if the path does not exist on disk it returns this error immediately.

Solutions

  1. Echo the path value from the error and confirm it exists: run `ls <path>` (or `ls -la` for the parent) in the same environment/cwd the app runs in.
  2. Pass an absolute path to the LinkedIn export zip or the extracted folder instead of a relative path.
  3. Re-download the export from LinkedIn (Settings & Privacy > Get a copy of your data) if the file was deleted or never finished downloading.
  4. Check for encoding issues: spaces or unicode characters in the filename may need quoting/escaping depending on how the path reaches open().

Example fix

// before
Source::open("~/Downloads/LinkedIn export")?; // typo / never downloaded

// after
let p = std::path::Path::new("/home/me/Downloads/linkedin_export.zip");
assert!(p.exists(), "re-download the export first");
Source::open(p.to_str().unwrap())?;
Defensive patterns

Strategy: validation

Validate before calling

let p = std::path::PathBuf::from(user_path);
let p = shellexpand::tilde(&user_path).map(|s| std::path::PathBuf::from(s.as_ref()))?;
anyhow::ensure!(p.exists(), "export path does not exist: {}", p.display());

Try / catch

match Source::open(&path) {
    Err(e) if e.to_string().contains("nao achei o caminho") => {
        eprintln!("Path '{}' not found; pass the LinkedIn export zip's full path", path);
    }
    r => r?,
}

Prevention

When it happens

Trigger: Calling Source::open with a path string that does not exist: a typo, a path that was moved/deleted, a relative path resolved against the wrong working directory, or a downloaded zip that was never actually saved.

Common situations: User passes the browser's download page URL instead of the file path; the export zip was deleted after extraction; running the tool from a different cwd so relative paths break; Windows-style path used verbatim on Unix.

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


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/4a90e3005006a75a. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/linkedin/source.rs:47

    norm(stem)
}

fn is_csv(name: &str) -> bool {
    name.to_ascii_lowercase().ends_with(".csv")
}

/// Tudo que o export tem dentro, arquivo por arquivo (inclui imagens), para
/// o inventario e para a checagem de foto de perfil.
pub struct Opened {
    pub source: Source,
    pub entries: Vec<String>,
}

impl Source {
    pub fn open(path: &str) -> Result<Opened> {
        let p = Path::new(path);
        if !p.exists() {
            return Err(anyhow!("nao achei o caminho do export: {}", path));
        }
        let mut entries = Vec::new();
        let source = if p.is_dir() {
            let mut files = HashMap::new();
            for e in walkdir::WalkDir::new(p)
                .max_depth(4)
                .into_iter()
                .filter_map(std::result::Result::ok)
            {
                if !e.file_type().is_file() {
                    continue;
                }
                let name = e.file_name().to_string_lossy().to_string();
                let rel = e
                    .path()
                    .strip_prefix(p)
                    .unwrap_or(e.path())
                    .to_string_lossy()

View on GitHub (pinned to 8600b91f42)