diff --git a/autogen/code_utils.py b/autogen/code_utils.py index 4ef74a566..2e35fbc4b 100644 --- a/autogen/code_utils.py +++ b/autogen/code_utils.py @@ -269,7 +269,7 @@ def execute_code( logs = result.stderr if original_filename is None: abs_path = str(pathlib.Path(filepath).absolute()) - logs = logs.replace(str(abs_path), "").replace(filepath, "") + logs = logs.replace(str(abs_path), "").replace(filename, "") else: abs_path = str(pathlib.Path(work_dir).absolute()) + "/" logs = logs.replace(str(abs_path), "")