diff --git a/src/pyrmv/raw/board_arrival.py b/src/pyrmv/raw/board_arrival.py index 1e34527..b6674ec 100644 --- a/src/pyrmv/raw/board_arrival.py +++ b/src/pyrmv/raw/board_arrival.py @@ -64,7 +64,7 @@ def board_arrival( payload = {} headers = {"Accept": "application/json"} if json else {"Accept": "application/xml"} - for var, val in locals().items(): + for var, val in locals().copy().items(): if str(var) == "date": if val != None: if isinstance(val, datetime): diff --git a/src/pyrmv/raw/board_departure.py b/src/pyrmv/raw/board_departure.py index e3cef29..dafe1fc 100644 --- a/src/pyrmv/raw/board_departure.py +++ b/src/pyrmv/raw/board_departure.py @@ -65,7 +65,7 @@ def board_departure( payload = {} headers = {"Accept": "application/json"} if json else {"Accept": "application/xml"} - for var, val in locals().items(): + for var, val in locals().copy().items(): if str(var) == "date": if val != None: if isinstance(val, datetime): diff --git a/src/pyrmv/raw/him_search.py b/src/pyrmv/raw/him_search.py index bd6a2c3..535a8e6 100644 --- a/src/pyrmv/raw/him_search.py +++ b/src/pyrmv/raw/him_search.py @@ -97,7 +97,7 @@ def him_search( payload = {} headers = {"Accept": "application/json"} if json else {"Accept": "application/xml"} - for var, val in locals().items(): + for var, val in locals().copy().items(): if str(var) in {"dateB", "dateE"}: if val != None: if isinstance(val, datetime): diff --git a/src/pyrmv/raw/journey_detail.py b/src/pyrmv/raw/journey_detail.py index 81235c2..39236d8 100644 --- a/src/pyrmv/raw/journey_detail.py +++ b/src/pyrmv/raw/journey_detail.py @@ -55,7 +55,7 @@ def journey_detail( payload = {} headers = {"Accept": "application/json"} if json else {"Accept": "application/xml"} - for var, val in locals().items(): + for var, val in locals().copy().items(): if str(var) == "rtMode": if val != None: payload["rtMode"] = val.upper() diff --git a/src/pyrmv/raw/stop_by_coords.py b/src/pyrmv/raw/stop_by_coords.py index b8c7f05..b4fbdf4 100644 --- a/src/pyrmv/raw/stop_by_coords.py +++ b/src/pyrmv/raw/stop_by_coords.py @@ -54,7 +54,7 @@ def stop_by_coords( payload = {} headers = {"Accept": "application/json"} if json else {"Accept": "application/xml"} - for var, val in locals().items(): + for var, val in locals().copy().items(): if str(var) == "stopType": if val != None: payload["type"] = val.upper() diff --git a/src/pyrmv/raw/stop_by_name.py b/src/pyrmv/raw/stop_by_name.py index 5355a0b..5ac372c 100644 --- a/src/pyrmv/raw/stop_by_name.py +++ b/src/pyrmv/raw/stop_by_name.py @@ -65,7 +65,7 @@ def stop_by_name( payload = {} headers = {"Accept": "application/json"} if json else {"Accept": "application/xml"} - for var, val in locals().items(): + for var, val in locals().copy().items(): if str(var) == "inputString": if val != None: payload["input"] = val diff --git a/src/pyrmv/raw/trip_find.py b/src/pyrmv/raw/trip_find.py index 8465074..887b2cd 100644 --- a/src/pyrmv/raw/trip_find.py +++ b/src/pyrmv/raw/trip_find.py @@ -201,7 +201,7 @@ def trip_find( payload = {} headers = {"Accept": "application/json"} if json else {"Accept": "application/xml"} - for var, val in locals().items(): + for var, val in locals().copy().items(): if str(var) == "date": if val != None: if isinstance(val, datetime): diff --git a/src/pyrmv/raw/trip_recon.py b/src/pyrmv/raw/trip_recon.py index e916e1e..ccb0941 100644 --- a/src/pyrmv/raw/trip_recon.py +++ b/src/pyrmv/raw/trip_recon.py @@ -87,7 +87,7 @@ def trip_recon( payload = {} headers = {"Accept": "application/json"} if json else {"Accept": "application/xml"} - for var, val in locals().items(): + for var, val in locals().copy().items(): if str(var) == "date": if val != None: if isinstance(val, datetime):