From ae23949ec02194138846c086b6e8110d3167b55a Mon Sep 17 00:00:00 2001 From: Kris Gesling Date: Tue, 22 Mar 2022 11:54:49 +0930 Subject: [PATCH] Declare file encoding to fix load failure (#84) The backend would fail to boot on certain machines without the encoding explicitly set. --- backend/app/file_system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/file_system.py b/backend/app/file_system.py index 6a5b5e8..1968728 100644 --- a/backend/app/file_system.py +++ b/backend/app/file_system.py @@ -113,7 +113,7 @@ class PromptsFS: """API Class for Prompt handling.""" def __init__(self): self.data = [] - with open(prompts_path, 'r') as f: + with open(prompts_path, 'r', encoding='utf8') as f: prompts = csv.reader(f, delimiter="\t") for p in prompts: self.data.append(p[0])