diff --git a/scripts/_helpers.py b/scripts/_helpers.py index ce97f6171..5beacdcf6 100644 --- a/scripts/_helpers.py +++ b/scripts/_helpers.py @@ -1300,6 +1300,9 @@ def locate_bus( # insert any variable into that place using .format - extract string and filter for those containing co (MA) point = Point(coords["x"], coords["y"]) # point object + if gdf_co.empty: + return None + try: return gdf_co[gdf_co.contains(point)][ col