fix: add explicit encoding="utf-8" to subprocess.run calls with text=True - #52249
fix: add explicit encoding="utf-8" to subprocess.run calls with text=True#52249AlexFucuson9 wants to merge 1 commit into
Conversation
…True subprocess.run(..., text=True) without encoding= defaults to the system's locale encoding. On non-UTF-8 locales (e.g. Windows with CP1252, Linux with C locale), this can produce garbled output or UnicodeDecodeError. Add explicit encoding="utf-8" to all subprocess.run calls that use text=True without specifying encoding. Fixes 11 occurrences across 8 files.
Related to the ongoing Windows/non-UTF-8 subprocess-encoding rollout (#25200 helper, #43494 gateway, #45144 Copilot ACP, #49564 doctor) — this PR covers additional unguarded @christian-byrne Tagging you on this ComfyUI item (it touches |
|
This PR adds |
|
Thanks for the targeted Windows-locale fix. The premise remains valid on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
|
Closing as resolved by PR #70875 (merged, commit 0f732cb), which closed out this bug class codebase-wide: every |
Problem
subprocess.run(..., text=True)withoutencoding=defaults to the system's locale encoding. On non-UTF-8 locales (Windows with CP1252, Linux withClocale), this can produce garbled output orUnicodeDecodeError.Files changed (11 fixes in 8 files)
skills/creative/comfyui/scripts/auto_fix_deps.pytools/tts_tool.pytools/transcription_tools.pytools/environments/singularity.pytools/voice_mode.pyhermes_cli/setup.pyhermes_cli/main.pytui_gateway/server.pyAll changes verified with
py_compile.