From fc440c4fa0125711d6555bf4c457d056effe9605 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 14 Jun 2023 18:11:22 +0200 Subject: [PATCH] Fix monster performance benchmark run on Windows The scene contains some interesting names, which requires to be written as utf-8. And on Windows file descriptor is not guaranteed to be using utf-8. Or, will error out if the invalid utf-8 sequence is written. This change makes it so running benchmarks on windows it fully successful. Pull Request: https://projects.blender.org/blender/blender/pulls/108982 --- tests/performance/api/environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/performance/api/environment.py b/tests/performance/api/environment.py index 094dbfa67ed..38f2a80922f 100644 --- a/tests/performance/api/environment.py +++ b/tests/performance/api/environment.py @@ -175,7 +175,7 @@ class TestEnvironment: if self.log_file: if not self.log_file.exists(): self.log_file.parent.mkdir(parents=True, exist_ok=True) - f = open(self.log_file, 'a') + f = open(self.log_file, 'a', encoding='utf-8', errors='ignore') f.write('\n' + ' '.join([str(arg) for arg in args]) + '\n\n') env = os.environ