Skip to content

fix(doctor): use load_dotenv_path and UTF-8 for config reads - #8432

Closed
Tianworld wants to merge 1 commit into
NousResearch:mainfrom
Tianworld:fix/doctor-env-yaml-encoding
Closed

fix(doctor): use load_dotenv_path and UTF-8 for config reads#8432
Tianworld wants to merge 1 commit into
NousResearch:mainfrom
Tianworld:fix/doctor-env-yaml-encoding

Conversation

@Tianworld

Copy link
Copy Markdown
Contributor

What

  • Load user and project .env via load_dotenv_path (UTF-8 + latin-1 fallback).
  • Read config.yaml as UTF-8 in stale-key detection and memory-provider probe.

Why

Project .env previously used UTF-8 only; Windows cp1252 files could fail. YAML reads without encoding use locale defaults on Windows.

How to test

\\�ash
hermes doctor
\\

Made with Cursor

- Match env_loader .env decoding (UTF-8 + latin-1) for project .env
- Open config.yaml as UTF-8 when scanning stale keys and memory provider

Made-with: Cursor
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard area/config Config system, migrations, profiles labels Apr 28, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to #8415 (same UTF-8 encoding fix pattern for .env loading). Consider merging these into a single PR.

@teknium1

Copy link
Copy Markdown
Contributor

Closing as already fixed on main.

Triage notes (high confidence):
hermes_cli/doctor.py on main uses load_hermes_dotenv at line 24 (handles UTF-8/latin-1 already); the two yaml opens already use encoding='utf-8' at doctor.py:738 and 1859.

If you still see this on the latest version, please reopen with reproduction steps.

(Bulk-closed during a CLI triage sweep.)

@teknium1 teknium1 closed this May 24, 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 comp/cli CLI entry point, hermes_cli/, setup wizard 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