Skip to content

fix: add explicit encoding="utf-8" to YAML/config open() calls - #8248

Closed
Aliciawque wants to merge 1 commit into
NousResearch:mainfrom
Aliciawque:fix/yaml-open-encoding
Closed

fix: add explicit encoding="utf-8" to YAML/config open() calls#8248
Aliciawque wants to merge 1 commit into
NousResearch:mainfrom
Aliciawque:fix/yaml-open-encoding

Conversation

@Aliciawque

Copy link
Copy Markdown

No description provided.

On Windows, Python's open() defaults to the system locale encoding
(often cp1252), not UTF-8. Config files containing non-ASCII content
(CJK model names, non-ASCII paths, plugin descriptions) would raise
UnicodeDecodeError or silently produce mojibake.

12 call sites across 8 files -- all reading or writing config.yaml,
plugin manifests, or model metadata cache -- now specify encoding="utf-8"
explicitly, matching the pattern already used elsewhere in the codebase
(e.g. prompt_builder.py, hermes_state.py, all Path.read_text() calls).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have area/config Config system, migrations, profiles labels Apr 28, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #15519 — same fix (add explicit encoding='utf-8' to open() calls for Windows safety). #15519 has broader scope covering 17 calls across 10 files.

@Aliciawque

Copy link
Copy Markdown
Author

Thanks for the triage. Agreed, #15519 covers this more broadly, so I’ll close this one in favor of that PR.

@Aliciawque Aliciawque closed this Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles 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.

3 participants