a-b-street/abstreet · error
None of the edits apply to this map
Error message
None of the edits apply to this map
What it means
After permissively upgrading an edit file (dropping commands that no longer fit the map), load_from_file requires at least one command to survive. If every command was stripped as broken, the edit is empty and considered useless, so it errors instead of returning empty edits.
Solutions
- Recreate the edits from scratch against the current map.
- Load the map version the edits were saved against.
- Inspect compat upgrade logs to see which commands were dropped and manually fix the JSON.
Defensive patterns
Strategy: try-catch
Try / catch
match Edits::load_from_file(map, path) {
Ok(e) => Ok(e),
Err(err) if err.to_string().contains("None of the edits apply") => {
warn!("all edits stale; starting fresh");
Ok(Edits::new(map.get_name().clone()))
}
Err(err) => Err(err),
} Prevention
- Recreate edits periodically rather than maintaining ancient files.
- Review permissive-upgrade warnings to learn which commands died and why.
- Archive edits together with the map build they were made on.
When it happens
Trigger: Calling Edits::load_from_file with an edit JSON whose commands all fail compat checks (stale lane types, changed lane counts, unknown roads/intersections) against the current map.
Common situations: Loading very old edits after major OSM/map regeneration; loading an edits file that was already fully applied; wrong city edits whose IDs coincidentally resolve to nothing valid.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- lane type has changed
- 's road doesn't point to dst_i at all
- 's road already points to dst_i
- speed limit has changed
- access restrictions have changed
AI-assisted analysis of a-b-street/abstreet@0964f29315 (2026-09-13).
Data as JSON: /api/errors/c9201ceb495b2b4e.
Report an issue: GitHub.
Appendix: source
Thrown at map_model/src/edits/mod.rs:231
let value = serde_json::from_slice(&bytes)?;
compat::upgrade(value, map)?
}
};
// Don't compare the full MapName; edits in one part of a city could apply to another. But
// make sure at least the city matches. Otherwise, we spend time trying to match up edits,
// and produce noisy logs along the way.
if map.get_name().city != perma.map_name.city {
bail!(
"Edits are for {:?}, but this map is {:?}",
perma.map_name.city,
map.get_name().city
);
}
let edits = perma.into_edits_permissive(map);
if edits.commands.is_empty() {
bail!("None of the edits apply to this map");
}
Ok(edits)
}
/// Load map edits from the given JSON bytes. Strip out any commands that're broken because
/// they don't match the current map. If the resulting edits are totally empty, consider that a
/// failure -- the edits likely don't cover this map at all.
pub fn load_from_bytes(map: &Map, bytes: Vec<u8>) -> Result<MapEdits> {
let perma = match abstutil::from_json::<PermanentMapEdits>(&bytes) {
Ok(perma) => perma,
Err(_) => {
// The JSON format may have changed, so attempt backwards compatibility.
let contents = std::str::from_utf8(&bytes)?;
let value = serde_json::from_str(contents)?;
compat::upgrade(value, map)?
}
};
let edits = perma.into_edits_permissive(map);View on GitHub (pinned to 0964f29315)