From 96bba3c1bda2c1f7753e00bd3ee0eae95a0b7817 Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Tue, 3 Dec 2024 05:17:34 -0600 Subject: [PATCH] fix: specify encoding for file with emoji in it so it loads on windows (#8873) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On windows this file load kept crashing stuff on startup so I specified the encoding ### Changes 🏗️ ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] Run the app! --- autogpt_platform/backend/backend/blocks/github/triggers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autogpt_platform/backend/backend/blocks/github/triggers.py b/autogpt_platform/backend/backend/blocks/github/triggers.py index ce24a649f..938dce84f 100644 --- a/autogpt_platform/backend/backend/blocks/github/triggers.py +++ b/autogpt_platform/backend/backend/blocks/github/triggers.py @@ -111,7 +111,9 @@ class GithubPullRequestTriggerBlock(GitHubTriggerBase, Block): def __init__(self): from backend.integrations.webhooks.github import GithubWebhookType - example_payload = json.loads(self.EXAMPLE_PAYLOAD_FILE.read_text()) + example_payload = json.loads( + self.EXAMPLE_PAYLOAD_FILE.read_text(encoding="utf-8") + ) super().__init__( id="6c60ec01-8128-419e-988f-96a063ee2fea",