More fixes for windoze

This commit is contained in:
teknium1 2026-02-25 15:20:42 -08:00
parent 3c5bf5b9d8
commit d72b9eadec
6 changed files with 29 additions and 8 deletions

View file

@ -19,9 +19,12 @@ HERMES_HOME = get_hermes_home()
from dotenv import load_dotenv
_env_path = get_env_path()
if _env_path.exists():
load_dotenv(_env_path)
try:
load_dotenv(_env_path, encoding="utf-8")
except UnicodeDecodeError:
load_dotenv(_env_path, encoding="latin-1")
# Also try project .env as fallback
load_dotenv(PROJECT_ROOT / ".env", override=False)
load_dotenv(PROJECT_ROOT / ".env", override=False, encoding="utf-8")
from hermes_cli.colors import Colors, color
from hermes_constants import OPENROUTER_MODELS_URL

View file

@ -37,7 +37,10 @@ sys.path.insert(0, str(PROJECT_ROOT))
from dotenv import load_dotenv
env_path = PROJECT_ROOT / '.env'
if env_path.exists():
load_dotenv(dotenv_path=env_path)
try:
load_dotenv(dotenv_path=env_path, encoding="utf-8")
except UnicodeDecodeError:
load_dotenv(dotenv_path=env_path, encoding="latin-1")
import logging