From 44690725afb3284913bdbafbb5d16657dacf03b6 Mon Sep 17 00:00:00 2001 From: EnragedAntelope Date: Tue, 19 May 2026 09:00:49 -0400 Subject: [PATCH] fix: specify UTF-8 encoding when reading style files Python's read_text() defaults to the OS locale encoding on Windows (cp1252), which cannot decode UTF-8 byte sequences in the style .txt files, causing a UnicodeDecodeError at import time. Explicitly passing encoding='utf-8' fixes the crash on all Windows locales. Co-Authored-By: Claude Sonnet 4.6 --- nodes/core/predefined_styles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/core/predefined_styles.py b/nodes/core/predefined_styles.py index 9763eee..aed51c9 100644 --- a/nodes/core/predefined_styles.py +++ b/nodes/core/predefined_styles.py @@ -69,7 +69,7 @@ def load_from_directory(self, category = name_parts[2].strip() if version and category: num_loaded_files += 1 - num_loaded_styles += self.load_from_string(file_path.read_text(), + num_loaded_styles += self.load_from_string(file_path.read_text(encoding='utf-8'), category = category, version = version) return num_loaded_files, num_loaded_styles