From 7ef1a73c7c542f2ce8fff2b7456edcdfa983f32e Mon Sep 17 00:00:00 2001 From: boqiu <82121246@qq.com> Date: Thu, 5 Sep 2024 15:25:53 +0800 Subject: [PATCH] Fix utf-8 encoding err --- tests/utility/run_all.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/utility/run_all.py b/tests/utility/run_all.py index 9e68b73..861f2f3 100644 --- a/tests/utility/run_all.py +++ b/tests/utility/run_all.py @@ -50,7 +50,11 @@ def run_single_test(py, script, test_dir, index, port_min, port_max): ) except subprocess.CalledProcessError as err: print_testcase_result(RED, CROSS, script, start_time) - print("Output of " + script + "\n" + err.output.decode("utf-8"), flush=True) + try: + print("Output of " + script + "\n" + err.output.decode("utf-8"), flush=True) + except UnicodeDecodeError: + print("Output of " + script + "\n", flush=True) + print(err.output) raise err print_testcase_result(BLUE, TICK, script, start_time)