tonhowtf/omniget · error

aponte os exports do Letterboxd, do Trakt ou do Goodreads…

Error message

aponte os exports do Letterboxd, do Trakt ou do Goodreads (JSON ou CSV)

What it means

merge::run aborts early when there is nothing to merge: collect_files found zero readable input files and no Spotify playlists were configured. The library requires at least one source (Letterboxd/Trakt/Goodreads export in JSON or CSV, or a Spotify list) before starting the merge pipeline.

Solutions

  1. Add at least one valid Letterboxd, Trakt or Goodreads export file (JSON or CSV) to opts.inputs
  2. Check the file paths in opts.inputs exist on disk (typos, moved files)
  3. If merging only from Spotify, populate opts.spotify with at least one playlist identifier
  4. Ensure opts.dest is also non-empty, otherwise the earlier 'escolha a pasta de destino' error fires first

Example fix

// before
let opts = Options { inputs: vec![], spotify: vec![], dest: "/tmp/out".into(), .. };
// after
let opts = Options { inputs: vec!["/tmp/letterboxd-export.csv".into()], spotify: vec![], dest: "/tmp/out".into(), .. };
Defensive patterns

Strategy: validation

Validate before calling

if opts.inputs.iter().all(|p| !std::path::Path::new(p).exists()) && opts.spotify.is_empty() {
    eprintln!("forneça pelo menos um export (Letterboxd/Trakt/Goodreads) ou uma lista do Spotify");
}

Prevention

When it happens

Trigger: Calling run(opts) where opts.inputs contains no existing files (collect_files returns empty) AND opts.spotify is empty; typically passing an empty inputs vec, a path to a nonexistent file, or forgetting to set the spotify field.

Common situations: User left the 'inputs' list empty in the merge dialog; input files were moved/deleted before the merge ran; a typo in the file path so collect_files silently skipped it; user thought Spotify-only merges were auto-detected but left opts.spotify empty too.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/lists/merge.rs:515

        s.push_str(&format!(" · {}×", e.times));
    }
    s.push('\n');
    if !e.review.is_empty() {
        let review = e.review.replace('\n', " ");
        s.push_str(&format!("  > {}\n", review.trim()));
    }
    s
}

// ── Execução ────────────────────────────────────────────────────────────

pub fn run(opts: &Options, p: &ProgressFn) -> Result<MergeResult> {
    if opts.dest.trim().is_empty() {
        return Err(anyhow!("escolha a pasta de destino"));
    }
    let files = collect_files(&opts.inputs);
    if files.is_empty() && opts.spotify.is_empty() {
        return Err(anyhow!(
            "aponte os exports do Letterboxd, do Trakt ou do Goodreads (JSON ou CSV)"
        ));
    }
    let total = (files.len() + opts.spotify.len().min(1)) as u64;
    let mut sources = Vec::new();
    let mut all: Vec<Entry> = Vec::new();

    for (i, f) in files.iter().enumerate() {
        let name = f.to_string_lossy().to_string();
        report(
            p,
            TOOL_ID,
            "progress",
            i as u64,
            Some(total),
            Some(name.clone()),
        );
        let Ok(text) = std::fs::read_to_string(f) else {

View on GitHub (pinned to 8600b91f42)