[GH-ISSUE #1556] cm-cli.py stopped working with ModuleNotFoundError: No module named 'utils' #663

Closed
opened 2026-10-27 21:20:33 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @jtabox on GitHub (Feb 16, 2025).
Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/1556

Hey,

I ran comfy update all (from the comfy-cli Python package) and it ended with this error:

Traceback (most recent call last):
  File "/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py", line 36, in <module>
    import utils.extra_config
ModuleNotFoundError: No module named 'utils'

I had comfy-cli version 1.3.6 when I ran the command initially, I then updated to latest 1.3.7 and the error persists. The comfy command is at this point almost completely unusable, since everything I try to do with it ends up with the above error and this output:

CalledProcessError: Command '['/usr/bin/python', '/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py',
'export-custom-node-ids', '/root/.config/comfy-cli/tmp/node-cache.list']' returned non-zero exit status 1.

Same goes if I try to run cm-cli.py directly.

I'm on Ubuntu 22.04 and Python 3.11.11. Both ComfyUI-Manager and ComfyUI repos are the latest available. (ComfyUI v0.3.14-29-gd0399f43 (2025-02-16), Manager: V3.22.1)



Pasting the whole traceback here, in case it's of any help:

18:13 root 0 ~ comfy update comfy
Updating ComfyUI in /workspace/ComfyUI...
Already up to date.
Requirement already satisfied: torch in /usr/local/lib/python3.11/dist-packages (from -r requirements.txt (line 1)) (2.5.1+cu124)
<... snipped multiple Requirement already satisfied lines >
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests->transformers>=4.28.1->-r requirements.txt (line 7)) (2025.1.31)
Traceback (most recent call last):
  File "/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py", line 36, in <module>
    import utils.extra_config
ModuleNotFoundError: No module named 'utils'
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ /usr/local/lib/python3.11/dist-packages/comfy_cli/tracking.py:77 in wrapper                                          │
│                                                                                                                      │
│    74 │   │   │   logging.debug(f"Tracking command: {command_name} with arguments: {filtered_k                       │
│    75 │   │   │   track_event(command_name, properties=filtered_kwargs)                                              │
│    76 │   │   │                                                                                                      │
│ ❱  77 │   │   │   return func(*args, **kwargs)                                                                       │
│    78 │   │                                                                                                          │
│    79 │   │   return wrapper                                                                                         │
│    80                                                                                                                │
│                                                                                                                      │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮                                       │
│ │            args = ()                                                       │                                       │
│ │    command_name = 'update'                                                 │                                       │
│ │ filtered_kwargs = {                                                        │                                       │
│ │                   │   'target': 'comfy',                                   │                                       │
│ │                   │   'cli_version': '1.3.7',                              │                                       │
│ │                   │   'tracing_id': 'fbf3aefb-34b8-4833-88ae-42c3ea3f1540' │                                       │
│ │                   }                                                        │                                       │
│ │          kwargs = {'target': 'comfy'}                                      │                                       │
│ │     sub_command = None                                                     │                                       │
│ ╰────────────────────────────────────────────────────────────────────────────╯                                       │
│                                                                                                                      │
│ /usr/local/lib/python3.11/dist-packages/comfy_cli/cmdline.py:393 in update                                           │
│                                                                                                                      │
│   390 │   │   │   check=True,                                                                                        │
│   391 │   │   )                                                                                                      │
│   392 │                                                                                                              │
│ ❱ 393 │   custom_nodes.command.update_node_id_cache()                                                                │
│   394                                                                                                                │
│   395                                                                                                                │
│   396 @app.command(help="Run API workflow file using the ComfyUI launched by `comfy launch --b                       │
│                                                                                                                      │
│ ╭───────────── locals ──────────────╮                                                                                │
│ │ comfy_path = '/workspace/ComfyUI' │                                                                                │
│ │     target = 'comfy'              │                                                                                │
│ ╰───────────────────────────────────╯                                                                                │
│                                                                                                                      │
│ /usr/local/lib/python3.11/dist-packages/comfy_cli/command/custom_nodes/command.py:496 in update_node_id_cache        │
│                                                                                                                      │
│   493 │                                                                                                              │
│   494 │   new_env = os.environ.copy()                                                                                │
│   495 │   new_env["COMFYUI_PATH"] = workspace_path                                                                   │
│ ❱ 496 │   subprocess.run(cmd, env=new_env, check=True)                                                               │
│   497                                                                                                                │
│   498                                                                                                                │
│   499 # `update, disable, enable, fix` allows `all` param                                                            │
│                                                                                                                      │
│ ╭───────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │     cache_path = '/root/.config/comfy-cli/tmp/node-cache.list'                                                   │ │
│ │    cm_cli_path = '/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py'                                     │ │
│ │            cmd = [                                                                                               │ │
│ │                  │   '/usr/bin/python',                                                                          │ │
│ │                  │   '/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py',                                │ │
│ │                  │   'export-custom-node-ids',                                                                   │ │
│ │                  │   '/root/.config/comfy-cli/tmp/node-cache.list'                                               │ │
│ │                  ]                                                                                               │ │
│ │ config_manager = <comfy_cli.config_manager.ConfigManager object at 0x7d84ba0f4850>                               │ │
│ │        new_env = {                                                                                               │ │
│ │                  │   'SHELL': '/bin/bash',                                                                       │ │
│ │                  │   'UV_CACHE_DIR': '/workspace/.cache/uv',                                                     │ │
│ │                  │   'PYTHON_VERSION': '3.11',                                                                   │ │
│ │                  │   ... +77                                                                                     │ │
│ │                  }                                                                                               │ │
│ │       tmp_path = '/root/.config/comfy-cli/tmp'                                                                   │ │
│ │ workspace_path = '/workspace/ComfyUI'                                                                            │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                                      │
│ /usr/lib/python3.11/subprocess.py:571 in run                                                                         │
│                                                                                                                      │
│    568 │   │   │   raise                                                                                             │
│    569 │   │   retcode = process.poll()                                                                              │
│    570 │   │   if check and retcode:                                                                                 │
│ ❱  571 │   │   │   raise CalledProcessError(retcode, process.args,                                                   │
│    572 │   │   │   │   │   │   │   │   │    output=stdout, stderr=stderr)                                            │
│    573 │   return CompletedProcess(process.args, retcode, stdout, stderr)                                            │
│    574                                                                                                               │
│                                                                                                                      │
│ ╭───────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ capture_output = False                                                                                           │ │
│ │          check = True                                                                                            │ │
│ │          input = None                                                                                            │ │
│ │         kwargs = {                                                                                               │ │
│ │                  │   'env': {                                                                                    │ │
│ │                  │   │   'SHELL': '/bin/bash',                                                                   │ │
│ │                  │   │   'UV_CACHE_DIR': '/workspace/.cache/uv',                                                 │ │
│ │                  │   │   'PYTHON_VERSION': '3.11',                                                               │ │
│ │                  │   │   ... +77                                                                                 │ │
│ │                  │   }                                                                                           │ │
│ │                  }                                                                                               │ │
│ │      popenargs = (                                                                                               │ │
│ │                  │   [                                                                                           │ │
│ │                  │   │   '/usr/bin/python',                                                                      │ │
│ │                  │   │   '/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py',                            │ │
│ │                  │   │   'export-custom-node-ids',                                                               │ │
│ │                  │   │   '/root/.config/comfy-cli/tmp/node-cache.list'                                           │ │
│ │                  │   ],                                                                                          │ │
│ │                  )                                                                                               │ │
│ │        process = <Popen: returncode: 1 args: ['/usr/bin/python', '/workspace/ComfyUI/custom_n...>                │ │
│ │        retcode = 1                                                                                               │ │
│ │         stderr = None                                                                                            │ │
│ │         stdout = None                                                                                            │ │
│ │        timeout = None                                                                                            │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
CalledProcessError: Command '['/usr/bin/python', '/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py',
'export-custom-node-ids', '/root/.config/comfy-cli/tmp/node-cache.list']' returned non-zero exit status 1.
18:13 root 1 ~ cd /workspace/ComfyUI/custom_nodes/ComfyUI-Manager/
18:14 root 0 /workspace/ComfyUI/custom_nodes/ComfyUI-Manager python cm-cli.py --help
Traceback (most recent call last):
  File "/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py", line 36, in <module>
    import utils.extra_config
ModuleNotFoundError: No module named 'utils'
Originally created by @jtabox on GitHub (Feb 16, 2025). Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/1556 Hey, I ran `comfy update all` (from the comfy-cli Python package) and it ended with this error: ``` Traceback (most recent call last): File "/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py", line 36, in <module> import utils.extra_config ModuleNotFoundError: No module named 'utils' ``` I had comfy-cli version 1.3.6 when I ran the command initially, I then updated to latest 1.3.7 and the error persists. The comfy command is at this point almost completely unusable, since everything I try to do with it ends up with the above error and this output: ``` CalledProcessError: Command '['/usr/bin/python', '/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py', 'export-custom-node-ids', '/root/.config/comfy-cli/tmp/node-cache.list']' returned non-zero exit status 1. ``` Same goes if I try to run cm-cli.py directly. I'm on Ubuntu 22.04 and Python 3.11.11. Both ComfyUI-Manager and ComfyUI repos are the latest available. (`ComfyUI v0.3.14-29-gd0399f43 (2025-02-16), Manager: V3.22.1`) --- --- Pasting the whole traceback here, in case it's of any help: ``` 18:13 root 0 ~ comfy update comfy Updating ComfyUI in /workspace/ComfyUI... Already up to date. Requirement already satisfied: torch in /usr/local/lib/python3.11/dist-packages (from -r requirements.txt (line 1)) (2.5.1+cu124) <... snipped multiple Requirement already satisfied lines > Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests->transformers>=4.28.1->-r requirements.txt (line 7)) (2025.1.31) Traceback (most recent call last): File "/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py", line 36, in <module> import utils.extra_config ModuleNotFoundError: No module named 'utils' ╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮ │ /usr/local/lib/python3.11/dist-packages/comfy_cli/tracking.py:77 in wrapper │ │ │ │ 74 │ │ │ logging.debug(f"Tracking command: {command_name} with arguments: {filtered_k │ │ 75 │ │ │ track_event(command_name, properties=filtered_kwargs) │ │ 76 │ │ │ │ │ ❱ 77 │ │ │ return func(*args, **kwargs) │ │ 78 │ │ │ │ 79 │ │ return wrapper │ │ 80 │ │ │ │ ╭────────────────────────────────── locals ──────────────────────────────────╮ │ │ │ args = () │ │ │ │ command_name = 'update' │ │ │ │ filtered_kwargs = { │ │ │ │ │ 'target': 'comfy', │ │ │ │ │ 'cli_version': '1.3.7', │ │ │ │ │ 'tracing_id': 'fbf3aefb-34b8-4833-88ae-42c3ea3f1540' │ │ │ │ } │ │ │ │ kwargs = {'target': 'comfy'} │ │ │ │ sub_command = None │ │ │ ╰────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /usr/local/lib/python3.11/dist-packages/comfy_cli/cmdline.py:393 in update │ │ │ │ 390 │ │ │ check=True, │ │ 391 │ │ ) │ │ 392 │ │ │ ❱ 393 │ custom_nodes.command.update_node_id_cache() │ │ 394 │ │ 395 │ │ 396 @app.command(help="Run API workflow file using the ComfyUI launched by `comfy launch --b │ │ │ │ ╭───────────── locals ──────────────╮ │ │ │ comfy_path = '/workspace/ComfyUI' │ │ │ │ target = 'comfy' │ │ │ ╰───────────────────────────────────╯ │ │ │ │ /usr/local/lib/python3.11/dist-packages/comfy_cli/command/custom_nodes/command.py:496 in update_node_id_cache │ │ │ │ 493 │ │ │ 494 │ new_env = os.environ.copy() │ │ 495 │ new_env["COMFYUI_PATH"] = workspace_path │ │ ❱ 496 │ subprocess.run(cmd, env=new_env, check=True) │ │ 497 │ │ 498 │ │ 499 # `update, disable, enable, fix` allows `all` param │ │ │ │ ╭───────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │ │ │ cache_path = '/root/.config/comfy-cli/tmp/node-cache.list' │ │ │ │ cm_cli_path = '/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py' │ │ │ │ cmd = [ │ │ │ │ │ '/usr/bin/python', │ │ │ │ │ '/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py', │ │ │ │ │ 'export-custom-node-ids', │ │ │ │ │ '/root/.config/comfy-cli/tmp/node-cache.list' │ │ │ │ ] │ │ │ │ config_manager = <comfy_cli.config_manager.ConfigManager object at 0x7d84ba0f4850> │ │ │ │ new_env = { │ │ │ │ │ 'SHELL': '/bin/bash', │ │ │ │ │ 'UV_CACHE_DIR': '/workspace/.cache/uv', │ │ │ │ │ 'PYTHON_VERSION': '3.11', │ │ │ │ │ ... +77 │ │ │ │ } │ │ │ │ tmp_path = '/root/.config/comfy-cli/tmp' │ │ │ │ workspace_path = '/workspace/ComfyUI' │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /usr/lib/python3.11/subprocess.py:571 in run │ │ │ │ 568 │ │ │ raise │ │ 569 │ │ retcode = process.poll() │ │ 570 │ │ if check and retcode: │ │ ❱ 571 │ │ │ raise CalledProcessError(retcode, process.args, │ │ 572 │ │ │ │ │ │ │ │ │ output=stdout, stderr=stderr) │ │ 573 │ return CompletedProcess(process.args, retcode, stdout, stderr) │ │ 574 │ │ │ │ ╭───────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │ │ │ capture_output = False │ │ │ │ check = True │ │ │ │ input = None │ │ │ │ kwargs = { │ │ │ │ │ 'env': { │ │ │ │ │ │ 'SHELL': '/bin/bash', │ │ │ │ │ │ 'UV_CACHE_DIR': '/workspace/.cache/uv', │ │ │ │ │ │ 'PYTHON_VERSION': '3.11', │ │ │ │ │ │ ... +77 │ │ │ │ │ } │ │ │ │ } │ │ │ │ popenargs = ( │ │ │ │ │ [ │ │ │ │ │ │ '/usr/bin/python', │ │ │ │ │ │ '/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py', │ │ │ │ │ │ 'export-custom-node-ids', │ │ │ │ │ │ '/root/.config/comfy-cli/tmp/node-cache.list' │ │ │ │ │ ], │ │ │ │ ) │ │ │ │ process = <Popen: returncode: 1 args: ['/usr/bin/python', '/workspace/ComfyUI/custom_n...> │ │ │ │ retcode = 1 │ │ │ │ stderr = None │ │ │ │ stdout = None │ │ │ │ timeout = None │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ CalledProcessError: Command '['/usr/bin/python', '/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py', 'export-custom-node-ids', '/root/.config/comfy-cli/tmp/node-cache.list']' returned non-zero exit status 1. 18:13 root 1 ~ cd /workspace/ComfyUI/custom_nodes/ComfyUI-Manager/ 18:14 root 0 /workspace/ComfyUI/custom_nodes/ComfyUI-Manager python cm-cli.py --help Traceback (most recent call last): File "/workspace/ComfyUI/custom_nodes/ComfyUI-Manager/cm-cli.py", line 36, in <module> import utils.extra_config ModuleNotFoundError: No module named 'utils' ```
Author
Owner

@ltdrdata commented on GitHub (Feb 16, 2025):

Confirmed.

<!-- gh-comment-id:2661652952 --> @ltdrdata commented on GitHub (Feb 16, 2025): Confirmed.
Author
Owner

@ltdrdata commented on GitHub (Feb 16, 2025):

This is fixed.

<!-- gh-comment-id:2661659147 --> @ltdrdata commented on GitHub (Feb 16, 2025): This is fixed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/ComfyUI-Manager#663
No description provided.