mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-09 03:11:58 +00:00
fix(profiles): pass encoding=utf-8 to distribution.yaml open (#22083)
_distribution_metadata() reads the profile's distribution.yaml without an explicit encoding, which defaults to the platform's locale encoding — UTF-8 on POSIX, cp1252/mbcs on Windows. Files round-tripped between hosts get mojibake on the Windows side. Single-line fix: add encoding='utf-8' to the open() call. Matches the sibling _read_config_model() site at line 398, which already does this. Surfaces once PR #21561 lands the blocking ruff-check CI job (PLW1514 — unspecified-encoding), but the underlying bug is pre-existing on main.
This commit is contained in:
parent
242da9db96
commit
ea2cc4f902
1 changed files with 1 additions and 1 deletions
|
|
@ -375,7 +375,7 @@ def _read_distribution_meta(profile_dir: Path) -> tuple:
|
|||
return None, None, None
|
||||
try:
|
||||
import yaml
|
||||
with open(mf_path, "r") as f:
|
||||
with open(mf_path, "r", encoding="utf-8") as f:
|
||||
data = yaml.safe_load(f) or {}
|
||||
if not isinstance(data, dict):
|
||||
return None, None, None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue