chaojie / ComfyUI-MotionCtrl-SVD

79 stars 5 forks source link

AttributeError: 'ComfyUIManagerLogger' object has no attribute 'isatty' #4

Closed cardenluo closed 5 months ago

cardenluo commented 5 months ago

Traceback (most recent call last): File "F:\Blender_ComfyUI_aki\ComfyUI\nodes.py", line 1872, in load_custom_node module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "F:\Blender_ComfyUI_aki\ComfyUI\custom_nodes\ComfyUI-MotionCtrl-SVD__init__.py", line 1, in from .nodes import NODE_CLASS_MAPPINGS File "F:\Blender_ComfyUI_aki\ComfyUI\custom_nodes\ComfyUI-MotionCtrl-SVD\nodes.py", line 17, in from .gradio_utils.motionctrl_cmcm_gradio import build_model, motionctrl_sample File "F:\Blender_ComfyUI_aki\ComfyUI\custom_nodes\ComfyUI-MotionCtrl-SVD\gradio_utils\motionctrl_cmcm_gradio.py", line 17, in from fire import Fire File "F:\Blender_ComfyUI_aki\python_embeded\lib\site-packages\fire__init__.py", line 21, in from fire.core import Fire File "F:\Blender_ComfyUI_aki\python_embeded\lib\site-packages\fire\core.py", line 67, in from fire import formatting File "F:\Blender_ComfyUI_aki\python_embeded\lib\site-packages\fire\formatting.py", line 21, in from fire import formatting_windows # pylint: disable=unused-import File "F:\Blender_ComfyUI_aki\python_embeded\lib\site-packages\fire\formatting_windows.py", line 60, in initialize_or_disable() File "F:\Blender_ComfyUI_aki\python_embeded\lib\site-packages\fire\formatting_windows.py", line 38, in initialize_or_disable if sys.stdout.isatty() and platform.release() == '10': AttributeError: 'ComfyUIManagerLogger' object has no attribute 'isatty'

Cannot import F:\Blender_ComfyUI_aki\ComfyUI\custom_nodes\ComfyUI-MotionCtrl-SVD module for custom nodes: 'ComfyUIManagerLogger' object has no attribute 'isatty'

chaojie commented 5 months ago

@cardenluo https://github.com/chaojie/ComfyUI-MotionCtrl-SVD/issues/1#issuecomment-1897193281

cardenluo commented 5 months ago

if the error comes from fire/formatting_windows.py, fix the code if sys.stdout.isatty() and platform.release() == '10': to if hasattr(sys.stdout, "isatty") and sys.stdout.isatty() and platform.release() == '10': its at line 38 in C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\fire\formatting_windows.py in my case.

it's work for me too