a-b-street/abstreet · error · anyhow::Error

can't start walking from

Error message

can't start walking from {}

What it means

start_sidewalk_spot converts a TripEndpoint into the SidewalkSpot where a pedestrian trip begins. For a border endpoint it calls SidewalkSpot::start_at_border, which returns Option; when the border intersection has no sidewalk (walking) lane connected, this error is thrown with the intersection ID. The trip cannot start walking from that border.

Solutions

  1. Pick a border intersection with an adjacent sidewalk when generating JustWalking trip endpoints
  2. Verify sidewalk data was imported for the map area containing the border
  3. Regenerate trip seeds against the current map so endpoints reference valid sidewalk borders
  4. Fall back to ending/starting the trip from the nearest building or sidewalk position instead

Example fix

// before
TripEndpoint::Border(i) => SidewalkSpot::start_at_border(i, map).ok_or_else(|| anyhow!("can't start walking from {}", i)),
// after
TripEndpoint::Border(i) => SidewalkSpot::start_at_border(i, map).ok_or_else(|| {
    warn!("border {} has no sidewalk; using nearest sidewalk spot", i);
    SidewalkSpot::suddenly_appear_near(i, map) // or return a Retryable error so the spawner relocates the endpoint
})
Defensive patterns

Strategy: fallback

Validate before calling

// before seeding a JustWalking trip at a border
if let TripEndpoint::Border(i) = endpt {
    if map.get_i(i).lanes(map).iter().all(|l| l.lt != LaneType::Sidewalk) {
        // pick a different border or building endpoint
    }
}

Try / catch

match start_sidewalk_spot(endpt, map) { Err(e) if e.to_string().starts_with("can't start walking") => { warn!("{}; relocating endpoint", e); start_at_nearest_sidewalk(endpt, map) }, r => r }

Prevention

When it happens

Trigger: TripSpec::JustWalking trips (via maybe_new) whose TripEndpoint::Border(i) intersection lacks an adjacent sidewalk lane — start_at_border returns None and the ok_or_else fires.

Common situations: Border intersections imported without sidewalks (highway ramps, rural borders); spawning walking trips at borders in maps where sidewalk coverage was reduced; trip seeds from a different map version than the one loaded.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at sim/src/make/spawner.rs:299

                        route,
                        stop1,
                        maybe_stop2,
                    }
                } else {
                    //warn!("{:?} not actually using transit, because pathfinding didn't find any
                    // useful route", trip);
                    TripSpec::JustWalking { start, goal }
                }
            }
        })
    }
}

fn start_sidewalk_spot(endpt: TripEndpoint, map: &Map) -> Result<SidewalkSpot> {
    match endpt {
        TripEndpoint::Building(b) => Ok(SidewalkSpot::building(b, map)),
        TripEndpoint::Border(i) => SidewalkSpot::start_at_border(i, map)
            .ok_or_else(|| anyhow!("can't start walking from {}", i)),
        TripEndpoint::SuddenlyAppear(pos) => Ok(SidewalkSpot::suddenly_appear(pos, map)),
    }
}

fn end_sidewalk_spot(endpt: TripEndpoint, map: &Map) -> Result<SidewalkSpot> {
    match endpt {
        TripEndpoint::Building(b) => Ok(SidewalkSpot::building(b, map)),
        TripEndpoint::Border(i) => {
            SidewalkSpot::end_at_border(i, map).ok_or_else(|| anyhow!("can't end walking at {}", i))
        }
        TripEndpoint::SuddenlyAppear(_) => unreachable!(),
    }
}

fn driving_goal(
    endpt: TripEndpoint,
    constraints: PathConstraints,
    map: &Map,

View on GitHub (pinned to 0964f29315)