ComfyUI/app
octo-patch 579a9263ea fix: guard LogInterceptor.flush() against OSError on Windows no-console setups (fixes #13554)
On Windows, when ComfyUI is launched without an attached console (e.g.
from a desktop shortcut or detached process), sys.__stdout__ may point
to an invalid console handle. Calling flush() on such a handle raises
OSError: [Errno 22] Invalid argument, which propagates up through any
code that calls print() and crashes every prompt execution.

Wrap super().flush() in LogInterceptor.flush() with the same
try/except (OSError, ValueError): pass pattern that is already used
elsewhere in the codebase for exactly this scenario. A failed flush on
a broken console handle just means the line isn't force-drained to that
console; content still reaches log_file and the in-memory log buffers.

Co-Authored-By: Octopus <liyuan851277048@icloud.com>
2026-04-27 10:41:38 +08:00
..
assets fix(assets): recognize temp directory in asset category resolution (#13159) 2026-03-25 19:59:59 -07:00
database feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00
__init__.py Add FrontendManager to manage non-default front-end impl (#3897) 2024-07-16 11:26:11 -04:00
app_settings.py Update frontend to v1.25.10 and revert navigation mode override (#9522) 2025-08-23 17:54:01 -04:00
custom_node_manager.py This should not be a warning. (#7946) 2025-05-05 07:49:07 -04:00
frontend_management.py Move parsing of requirements logic to function. (#12701) 2026-02-28 22:21:32 -05:00
logger.py fix: guard LogInterceptor.flush() against OSError on Windows no-console setups (fixes #13554) 2026-04-27 10:41:38 +08:00
model_manager.py New Year ruff cleanup. (#11595) 2026-01-01 22:06:14 -05:00
node_replace_manager.py Fix KeyError when prompt entries lack class_type key (#12595) 2026-02-24 16:02:05 -05:00
subgraph_manager.py fix: specify UTF-8 encoding when reading subgraph files (#12563) 2026-02-21 15:05:00 -08:00
user_manager.py fix: atomic writes for userdata to prevent data loss on crash (#12987) 2026-03-16 21:56:35 -04:00