Reference only

Cannot import name after an update: check the importing code and dependency together

The module may exist while an expected class or function no longer does. A partial update, API change or local name collision can look like a missing package but needs a different response.

Symptoms and scope

The module may exist while an expected class or function no longer does. A partial update, API change or local name collision can look like a missing package but needs a different response.

Error fragments for search; IDs, values and filenames may vary:

ImportError: cannot import name
AttributeError

Source-supported context

ComfyUI's custom-node troubleshooting distinguishes node conflicts from missing files. Disabling node code does not undo changes that its installer already made to shared Python dependencies. Source 1 Source 2

Cases to distinguish

1. The node version expects an API that the installed dependency no longer exposes.

2. Updates left duplicate or partially updated copies on the import path.

3. A local filename shadows the intended package, or a circular import leaves it partially initialized.

Diagnostic sequence

The sequence below is an editorial procedure based on the cited context, not a diagnosis already confirmed for your environment.

Step 1. Record the exact missing symbol, importing file and earliest traceback. Do not diagnose from the last queue error alone.

Step 2. Check the actual imported file path and versions. Preserve a backup before removing or moving suspected duplicate files.

Step 3. Test the author's supported node/dependency combination in an isolated copy. Restore a coherent snapshot rather than rolling back only main.py.

Step 4. Restart, run a minimal relevant workflow and report the exact pair of versions if the API failure persists.

Completion check

The symbol can be imported by the same runtime and the affected node operates. A clean pip check is useful, but does not establish API compatibility.

Limitations and cautions

Do not repair this by inventing replacement function signatures or upgrading the whole environment indiscriminately.

Original sources

Localization prepared: 2026-09-22. The source-check dates above were inherited from the existing article; this translation does not claim they were all rechecked today. No GPU run, minimum-memory measurement or runtime guarantee is supplied.

Didn't solve it?

Check the next possible cause

The same symptom can come from a different cause. Work through these related entries in order.

  1. Back up before updating ComfyUI: a source rollback is not an environment rollbackRecovering old code does not automatically restore Python packages, frontend, nodes or configuration. Establish recovery information for the whole relevant environment.
  2. Isolate custom-node conflicts with a reproducible baseline and binary searchReplace random uninstalling with controlled groups and repeatable input. The goal is the smallest triggering set, not a blanket verdict on all third-party nodes.
Paste your full log into the error finder

Was this page helpful?

Anonymous. Only a yes/no counter is stored; no account, IP address or device details.

Sources & references

Localized from the existing Chinese research draft. Original source-check dates are retained; this translation is not new technical verification or a runtime test.

01ComfyUI custom node troubleshootingSource checked: 2026-09-2102How to update ComfyUISource checked: 2026-09-21

Report an issue · e3ba15da-853c-5247-ae04-2346f2430b98