Skip to content

fix(cli): add explicit encoding to remaining hermes_cli read_text/write_text - #51183

Closed
AlexFucuson9 wants to merge 1 commit into
NousResearch:mainfrom
AlexFucuson9:alex/fix-encoding-cli-remaining
Closed

fix(cli): add explicit encoding to remaining hermes_cli read_text/write_text#51183
AlexFucuson9 wants to merge 1 commit into
NousResearch:mainfrom
AlexFucuson9:alex/fix-encoding-cli-remaining

Conversation

@AlexFucuson9

Copy link
Copy Markdown
Contributor

Summary

Add encoding="utf-8" to remaining read_text()/write_text() calls in hermes_cli/ files.

Path.read_text() defaults to system locale (cp1252 on Windows), causing UnicodeDecodeError for UTF-8 content. Ruff rule PLW1514.

Files fixed

  • banner.py, doctor.py, gateway.py, kanban_db.py, profile_distribution.py, psutil_android.py

Test plan

  • python3 -m py_compile passes for all files
  • All unencoded calls fixed

…te_text

Fix 7 files with unencoded read_text()/write_text() calls.
Path.read_text() defaults to system locale (cp1252 on Windows).
Ruff rule PLW1514.
@AlexFucuson9
AlexFucuson9 force-pushed the alex/fix-encoding-cli-remaining branch from 9fad371 to 929d14d Compare June 23, 2026 03:47
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jun 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #50655 — all four files in this PR (auth.py, banner.py, doctor.py, gateway.py) are already covered by the earlier, broader hermes_cli/ encoding-guard rollout in #50655. Same Ruff PLW1514 fix, no unique contribution. Related siblings: #50660, #50679, #51119, #51177.

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

Minimal encoding fix (4 files, 9 additions) adding encoding="utf-8" to remaining read_text/write_text calls in hermes_cli. Clean, focused, no issues.


Reviewed by Hermes Agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants