fix: add encoding='utf-8' to remaining read_text() calls (batch 3) - #51761
Closed
AlexFucuson9 wants to merge 1 commit into
Closed
fix: add encoding='utf-8' to remaining read_text() calls (batch 3)#51761AlexFucuson9 wants to merge 1 commit into
AlexFucuson9 wants to merge 1 commit into
Conversation
Final cleanup of Path.read_text() calls without explicit encoding. On Windows with non-UTF-8 locale, the default encoding is the system locale, causing UnicodeDecodeError on valid UTF-8 files. 16 files, 38 lines changed: - tools/skills_hub.py (6), hermes_cli/profiles.py (5) - hermes_cli/doctor.py, auth.py, plugins/memory/mem0/_setup.py, plugins/memory/hindsight/__init__.py, plugins/hermes-achievements/dashboard/plugin_api.py (3 each) - hermes_cli/uninstall.py, plugins/platforms/whatsapp/adapter.py, plugins/disk-cleanup/disk_cleanup.py (2 each) - hermes_cli/service_manager.py, container_boot.py, plugins/platforms/google_chat/adapter.py, plugins/memory/mem0/__init__.py, plugins/memory/honcho/__init__.py, plugins/google_meet/realtime/openai_client.py (1 each) All changes: .read_text() -> .read_text(encoding='utf-8')
This was referenced Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add
encoding='utf-8'to the final 38 remainingPath.read_text()calls across 16 files.Why
On Windows with non-UTF-8 locale (e.g. cp936/GBK),
read_text()without explicit encoding uses the system locale, causingUnicodeDecodeErroron valid UTF-8 files.Complements PR #51748 (batch 1, 15 files) and #51752 (batch 2, 11 files).
Changes (16 files, 38 lines)
tools/skills_hub.pyhermes_cli/profiles.pyhermes_cli/doctor.pyhermes_cli/auth.pyplugins/memory/mem0/_setup.pyplugins/memory/hindsight/__init__.pyplugins/hermes-achievements/dashboard/plugin_api.pyhermes_cli/uninstall.pyplugins/platforms/whatsapp/adapter.pyplugins/disk-cleanup/disk_cleanup.pyhermes_cli/service_manager.pyhermes_cli/container_boot.pyplugins/platforms/google_chat/adapter.pyplugins/memory/mem0/__init__.pyplugins/memory/honcho/__init__.pyplugins/google_meet/realtime/openai_client.pyAfter this PR, zero
.read_text()calls without encoding remain in production code.