Reference only

simpleeval: distinguish a missing module from an invalid expression

Check the dependency first, then the expression and allowed operations exposed by the node.

The import and the expression are separate

The simpleeval project describes constrained expression evaluation, including exposed names, functions and resource limits.1 A missing module is not the same as a rejected expression.

python -m pip show simpleeval

Our suggested investigation starts by preserving the original node, expression, input values and exception. For a missing package, follow the node's dependency declaration. For an unknown name or function, check what that node actually exposes to its evaluator.

In a copy, reduce the expression to one known input, then restore one operation at a time. This is a diagnostic method, not a claim that every node supports the same expression language.

Do not replace a constrained evaluator with unrestricted Python eval or remove computational limits to make a shared workflow run. Validate the expected output type and result before reconnecting the node to the larger workflow. Replacing the original expression with an unrelated constant is only a smoke test, not a completed repair.

Research draft. No local/GPU reproduction or independent editorial sign-off. Upstream statements and our recommendations are distinguished.

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. No module named yaml, PIL or pydantic_settings: check the distribution nameNo module named yamlMatch the import name to its distribution before changing the Python environment that runs ComfyUI.
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

Research draft. No local/GPU reproduction or independent editorial sign-off. Upstream statements and our recommendations are distinguished.

01simpleeval project documentationSource checked: 2026-09-21

Report an issue · 26b9511a-f707-58de-846e-dd0ec14e28d1