From a814ba54de56eaf984f4aa6bb5ea889c8c2b41b2 Mon Sep 17 00:00:00 2001 From: Eduardo Salinas Date: Tue, 12 Mar 2024 17:28:16 -0400 Subject: [PATCH] fix: [autogenbench] windows fails unless we specify encoding (#1957) --- samples/tools/autogenbench/autogenbench/run_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/tools/autogenbench/autogenbench/run_cmd.py b/samples/tools/autogenbench/autogenbench/run_cmd.py index d4f6d3face3e..e548a16b8f91 100644 --- a/samples/tools/autogenbench/autogenbench/run_cmd.py +++ b/samples/tools/autogenbench/autogenbench/run_cmd.py @@ -492,7 +492,7 @@ def run_scenario_in_docker(work_dir, env, timeout=TASK_TIMEOUT, docker_image=Non docker_timeout = timeout + 60 # One full minute after the bash timeout command should have already triggered start_time = time.time() logs = container.logs(stream=True) - log_file = open(os.path.join(work_dir, "console_log.txt"), "wt") + log_file = open(os.path.join(work_dir, "console_log.txt"), "wt", encoding="utf-8") stopping = False for chunk in logs: # When streaming it should return a generator