From 2d824947f866da6e77710c0f6f6ef4a795372a8e Mon Sep 17 00:00:00 2001 From: tobitege Date: Sun, 16 Jun 2024 16:27:21 +0200 Subject: [PATCH] fix: improve toml parsing exception (#2459) --- opendevin/core/config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opendevin/core/config.py b/opendevin/core/config.py index 191fb37ace..e17a3f7b24 100644 --- a/opendevin/core/config.py +++ b/opendevin/core/config.py @@ -340,9 +340,9 @@ def load_from_toml(config: AppConfig, toml_file: str = 'config.toml'): except FileNotFoundError as e: logger.info(f'Config file not found: {e}') return - except toml.TomlDecodeError: + except toml.TomlDecodeError as e: logger.warning( - 'Cannot parse config from toml, toml values have not been applied.', + f'Cannot parse config from toml, toml values have not been applied.\nError: {e}', exc_info=False, ) return @@ -368,9 +368,9 @@ def load_from_toml(config: AppConfig, toml_file: str = 'config.toml'): # update the config object with the new values config = AppConfig(llm=llm_config, agent=agent_config, **core_config) - except (TypeError, KeyError): + except (TypeError, KeyError) as e: logger.warning( - 'Cannot parse config from toml, toml values have not been applied.', + f'Cannot parse config from toml, toml values have not been applied.\nError: {e}', exc_info=False, )