a-b-street/abstreet · error

errors

Error message

{} errors: {}

What it means

download_files in the data updater accumulates an error message for every file that fails to download; if any messages accumulated, it bails aggregating the count and all individual messages. It's a batch-failure report, so one bail can represent many underlying failures.

Solutions

  1. Read the per-file messages in the error to see which URLs failed and why.
  2. Check network connectivity / proxy settings and retry the download prompt.
  3. If a URL is permanently dead, manually fetch the file into the expected data/ path or update the remote source list.
  4. Re-run the updater after fixing — it resumes with the still-missing files only.
Defensive patterns

Strategy: retry

Try / catch

match download_files(&paths, timer) {
    Ok(()) => {},
    Err(e) => {
        eprintln!("Some downloads failed:\n{e}");
        // inspect per-file messages, fix connectivity, then retry
        eprintln!("Fix network/proxy and re-run the updater; it retries only missing files.");
    }
}

Prevention

When it happens

Trigger: Running prompt_to_download_missing_data when one or more remote data files fail: 404/403 on the host, network outage, DNS failure, or insufficient disk space during save.

Common situations: Offline or firewalled environments; upstream hosting changes URL or removes old data files; proxy blocks large downloads; partial mirror sync.

Understand the failure class

Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.

Related errors


AI-assisted analysis of a-b-street/abstreet@0964f29315 (2026-09-13). Data as JSON: /api/errors/619dd905bb0ba194. Report an issue: GitHub.

Appendix: source

Thrown at map_gui/src/tools/updater.rs:146

                // TODO Instead of holding everything in memory like this, we could also try to
                // stream the gunzipping and output writing
                info!("Decompressing {}", path);
                fs_err::create_dir_all(std::path::Path::new(&local_path).parent().unwrap())
                    .unwrap();
                let mut out = File::create(&local_path).unwrap();
                let mut decoder = flate2::read::GzDecoder::new(&bytes[..]);
                std::io::copy(&mut decoder, &mut out).map_err(|err| err.into())
            }) {
            Ok(_) => {}
            Err(err) => {
                let msg = format!("Problem with {}: {}", url, err);
                error!("{}", msg);
                messages.push(msg);
            }
        }
    }
    if !messages.is_empty() {
        bail!("{} errors: {}", messages.len(), messages.join(", "));
    }
    Ok(())
}

View on GitHub (pinned to 0964f29315)