From d7a70f58b60edf8fee807a4f07c0226448c1aa35 Mon Sep 17 00:00:00 2001 From: Alexey Khrulenko Date: Fri, 11 Sep 2026 18:44:53 +0200 Subject: [PATCH] Write PET log file as UTF-8 FileHandler used the OS default encoding, which on Windows is a legacy codepage (cp1252) that cannot encode the box-drawing characters in the timestamps and tables. Every record raised UnicodeEncodeError inside the handler, so the log file was left empty while the run carried on. No effect on Linux, where UTF-8 is already the default. Co-Authored-By: Claude Opus 5 --- src/ensemble/logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ensemble/logger.py b/src/ensemble/logger.py index 57010bcb..788f255d 100644 --- a/src/ensemble/logger.py +++ b/src/ensemble/logger.py @@ -18,7 +18,7 @@ def __init__(self, filename=None): format='%(asctime)s : %(message)s', datefmt='%Y-%m-%d│%H:%M:%S', handlers=[ - logging.FileHandler(self.filename, mode='w'), + logging.FileHandler(self.filename, mode='w', encoding='utf-8'), logging.StreamHandler() ] )