{"record":{"id":"34c75e0a1920dfa4","repo":"AtsushiSakai/PythonRobotics","slug":"no-path-found","errorCode":null,"errorMessage":"No path found","messagePattern":"No path found","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"PathPlanning/TimeBasedPathPlanning/SafeInterval.py","lineNumber":96,"sourceCode":"                while True:\n                    path.append(path_walker)\n                    if path_walker.parent_index == -1:\n                        break\n                    path_walker = expanded_list[path_walker.parent_index]\n\n                # reverse path so it goes start -> goal\n                path.reverse()\n                return NodePath(path, len(expanded_list))\n\n            expanded_idx = len(expanded_list)\n            expanded_list.append(expanded_node)\n            entry_time_and_node = EntryTimeAndInterval(expanded_node.time, expanded_node.interval)\n            add_entry_to_visited_intervals_array(entry_time_and_node, visited_intervals, expanded_node)\n\n            for child in SafeIntervalPathPlanner.generate_successors(grid, goal, expanded_node, expanded_idx, safe_intervals, visited_intervals):\n                heapq.heappush(open_set, child)\n\n        raise Exception(\"No path found\")\n\n    \"\"\"\n    Generate list of possible successors of the provided `parent_node` that are worth expanding\n    \"\"\"\n    @staticmethod\n    def generate_successors(\n        grid: Grid, goal: Position, parent_node: SIPPNode, parent_node_idx: int, intervals: np.ndarray, visited_intervals: np.ndarray\n    ) -> list[SIPPNode]:\n        new_nodes = []\n        diffs = [\n            Position(0, 0),\n            Position(1, 0),\n            Position(-1, 0),\n            Position(0, 1),\n            Position(0, -1),\n        ]\n        for diff in diffs:\n            new_pos = parent_node.position + diff","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/AtsushiSakai/PythonRobotics/blob/1fe4fb980f6a12fe21c3c33d2b4da97a52c9154d/PathPlanning/TimeBasedPathPlanning/SafeInterval.py#L78-L114","documentation":"Thrown by SafeIntervalPathPlanner.plan when the open set is exhausted without reaching the goal: no sequence of safe-interval transitions exists from start to goal under the current dynamic obstacles and reservations. This is the standard 'unsolvable instance' signal for the planner.","triggerScenarios":"Calling SafeInterval.plan(grid, start, goal) where the goal (or all routes to it) is permanently blocked by obstacle trajectories or reserved cells, or the time_limit of the grid is too short to reach the goal.","commonSituations":"Dense obstacle arrangements (e.g. NARROW_CORRIDOR with moving blockers); a grid time_limit smaller than the shortest path length; goal cell occupied by an obstacle at all safe intervals; previously reserved agent paths walling off the goal.","solutions":["Increase the grid's time_limit so a feasible arrival time exists","Reduce num_obstacles or change obstacle_arrangement so a safe route exists","Verify start/goal are valid, in-bounds cells not permanently occupied by obstacles","Wrap plan() in try/except and report 'unreachable goal' to the caller instead of crashing"],"exampleFix":"# before\npath = SafeIntervalPathPlanner.plan(grid, start, goal)\n\n# after\ntry:\n    path = SafeIntervalPathPlanner.plan(grid, start, goal)\nexcept Exception as e:\n    if 'No path found' in str(e):\n        path = None  # handle unreachable goal\n    else:\n        raise","handlingStrategy":"try-catch","validationCode":"# sanity check before planning: goal reachable in principle within time limit\nassert grid.time_limit > abs(start.x - goal.x) + abs(start.y - goal.y), \"time_limit too short for any path\"","typeGuard":null,"tryCatchPattern":"try:\n    path = planner.plan(grid, start, goal)\nexcept Exception as e:\n    if str(e) == 'No path found':\n        path = None  # treat as unreachable; relax constraints or skip agent\n    else:\n        raise","preventionTips":["Size time_limit generously relative to grid dimensions and obstacle density","Start with sparse obstacle scenarios when tuning; increase density gradually","Treat 'No path found' as an expected outcome in multi-agent loops, not a crash"],"tags":["path-planning","safe-interval","no-solution","search-exhausted"],"backgroundTag":"pathfinding-no-solution","analyzedSha":"1fe4fb980f6a12fe21c3c33d2b4da97a52c9154d","analyzedAt":"2026-08-28T13:23:33.733Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}