Skip to content

Commit 2e36f33

Browse files
robinjhuangclaude
andauthored
Fix Windows Unicode error in node commands (#277)
* Fix Windows Unicode error in node commands Fixes UnicodeDecodeError when running `comfy node show all` on Windows by explicitly setting UTF-8 encoding with error handling for subprocess calls to ComfyUI-Manager. The error occurred because Windows defaults to cp1252 encoding which cannot decode certain Unicode characters (byte 0x9d) output by ComfyUI-Manager scripts. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * Format. --------- Co-authored-by: Claude <[email protected]>
1 parent d9d4248 commit 2e36f33

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

comfy_cli/command/custom_nodes/cm_cli_util.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ def execute_cm_cli(args, channel=None, fast_deps=False, mode=None) -> str | None
5757
print(f"Execute from: {workspace_path}")
5858

5959
try:
60-
result = subprocess.run(cmd, env=new_env, check=True, capture_output=True, text=True)
60+
result = subprocess.run(
61+
cmd, env=new_env, check=True, capture_output=True, text=True, encoding="utf-8", errors="replace"
62+
)
6163
print(result.stdout)
6264

6365
if fast_deps and args[0] in _dependency_cmds:

0 commit comments

Comments
 (0)