a-b-street/abstreet · error

No turn from ( ) to ( ) at

Error message

No turn from {} ({}) to {} ({}) at {}

What it means

walking_path_to_steps converts a sequence of sidewalk-endpoint nodes back into concrete PathSteps. For each consecutive pair of roads it looks up the turn between their sidewalks at the shared intersection, in both directions (movement and contraflow). When neither direction yields a turn, the path produced by the input graph is inconsistent with the map's actual turn geometry — a bug in path construction, not bad user input, and the full path is printed before panicking to aid debugging.

Solutions

  1. Fix the input graph builder so it only connects sidewalk endpoints that share a real turn at the intersection
  2. Inspect the printed 'weird path' to find why the graph edge has no corresponding map turn
  3. Regenerate or repair the map's turn geometry if turns are missing between adjacent sidewalks
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at map_model/src/pathfind/walking.rs:461 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at map_model/src/pathfind/walking.rs:461

let i = if r1_endpt {
    r1.dst_i(map)
} else {
    r1.src_i(map)
};
// Could assert the intersection matches (r2, r2_endpt).
if let Some(t) =
    map.get_turn_between(r1.must_get_sidewalk(map), r2.must_get_sidewalk(map), i)
{
    steps.push(PathStepV2::Movement(t.id.to_movement(map)));
} else if let Some(t) =
    map.get_turn_between(r2.must_get_sidewalk(map), r1.must_get_sidewalk(map), i)
{
    steps.push(PathStepV2::ContraflowMovement(t.id.to_movement(map)));
} else {
    println!("walking_path_to_steps has a weird path:");
    for s in &path {
        println!("- {:?}", s);
    }
    panic!(
        "No turn from {} ({}) to {} ({}) at {}",
        r1,
        r1.must_get_sidewalk(map),
        r2,
        r2.must_get_sidewalk(map),
        i
    );
}

View on GitHub (pinned to 0964f29315)