diff --git a/pyrmv/raw/stop_by_coords.py b/pyrmv/raw/stop_by_coords.py index 35af6ca..7dde913 100644 --- a/pyrmv/raw/stop_by_coords.py +++ b/pyrmv/raw/stop_by_coords.py @@ -75,5 +75,8 @@ def stop_by_coords(accessId: str, else: stops = [] for stop in output.json()["stopLocationOrCoordLocation"]: - stops.append(Stop(stop["StopLocation"])) + if "StopLocation" in stop: + stops.append(Stop(stop["StopLocation"])) + elif "CoordLocation" in stop: + stops.append(Stop(stop["CoordLocation"])) return stops \ No newline at end of file diff --git a/pyrmv/raw/stop_by_name.py b/pyrmv/raw/stop_by_name.py index 8a668b3..93f8140 100644 --- a/pyrmv/raw/stop_by_name.py +++ b/pyrmv/raw/stop_by_name.py @@ -89,5 +89,8 @@ def stop_by_name(accessId: str, else: stops = [] for stop in output.json()["stopLocationOrCoordLocation"]: - stops.append(Stop(stop["StopLocation"])) + if "StopLocation" in stop: + stops.append(Stop(stop["StopLocation"])) + elif "CoordLocation" in stop: + stops.append(Stop(stop["CoordLocation"])) return stops \ No newline at end of file