From 69bcc49145daa4ef4c89df603a47bd787ed9ba94 Mon Sep 17 00:00:00 2001 From: JosephPTM1 Date: Wed, 20 May 2026 08:33:36 +0100 Subject: [PATCH] Fix error message formatting in _handle_proxies and grammatical error in translate_to_boolean --- TM1py/Services/RestService.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TM1py/Services/RestService.py b/TM1py/Services/RestService.py index d14b4656..dd5b20c2 100644 --- a/TM1py/Services/RestService.py +++ b/TM1py/Services/RestService.py @@ -257,7 +257,7 @@ def _handle_proxies(self, proxies: Union[Dict, str]): try: return json.loads(proxies) except JSONDecodeError: - raise ValueError("Invalid JSON passed for argument 'proxies': %s", proxies) + raise ValueError(f"Invalid JSON passed for argument 'proxies': {proxies}") # handle invalid type raise ValueError("Argument of 'proxies' must be None, dictionary or JSON string") @@ -1133,7 +1133,7 @@ def translate_to_boolean(value) -> bool: elif isinstance(value, str): return value.replace(" ", "").lower() == "true" else: - raise ValueError("Invalid argument: '" + value + "'. Must be to be of type 'bool' or 'str'") + raise ValueError("Invalid argument: '" + value + "'. Must be of type 'bool' or 'str'") @staticmethod def b64_decode_password(encrypted_password: str) -> str: