Common error patterns and troubleshooting guides for Kailash SDK including Nexus blocking issues, connection parameter errors, runtime execution errors, cycle convergence problems, missing .build() calls, parameter validation errors, and DataFlow template syntax errors. Use when encountering errors, debugging issues, or asking about 'error', 'troubleshooting', 'debugging', 'not working', 'hangs', 'timeout', 'validation error', 'connection error', 'runtime error', 'cycle not converging', 'missing build', or 'template syntax'.
Comprehensive troubleshooting guides for common Kailash SDK errors and issues.
Common error patterns and solutions for:
TypeError: execute() expects Workflow, got WorkflowBuilderruntime.execute(workflow) instead of runtime.execute(workflow.build()).build() before executionruntime.execute(workflow.build())(source_id, source_param, target_id, target_param)ValidationError: Missing required parametercycle_complete flagSyntaxError in template strings{{variable}} or {param}| Symptom | Error Type | Quick Fix |
|---|---|---|
| API hangs forever | Nexus blocking | Use AsyncLocalRuntime |
| TypeError: expects Workflow | Missing .build() | Add .build() call |
| Node gets wrong data | Connection params | Check 4-parameter format |
| ValidationError | Parameter validation | Check required params |
| Infinite loop | Cycle convergence | Add convergence condition |
| Template SyntaxError | DataFlow template | Fix template syntax |
| Runtime fails | Runtime execution | Check logs, validate inputs |
Before Running Workflow:
.build() on WorkflowBuilder?# ❌ WRONG (causes hang in Docker)
from kailash.runtime import LocalRuntime
nexus = Nexus(workflows, runtime_factory=lambda: LocalRuntime())
# ✅ CORRECT (async-first, no threads)
from kailash.runtime import AsyncLocalRuntime
nexus = Nexus(workflows, runtime_factory=lambda: AsyncLocalRuntime())
# ❌ WRONG
workflow = WorkflowBuilder()
workflow.add_node(...)
results = runtime.execute(workflow) # TypeError!
# ✅ CORRECT
workflow = WorkflowBuilder()
workflow.add_node(...)
results = runtime.execute(workflow.build()) # Always .build()
# ❌ WRONG (only 2 parameters)
workflow.add_connection("node1", "node2")
# ❌ WRONG (wrong parameter names)
workflow.add_connection("node1", "output", "node2", "input_data")
# but node2 expects "data" not "input_data"
# ✅ CORRECT (4 parameters, correct names)
workflow.add_connection("node1", "result", "node2", "data")
# ❌ WRONG (infinite loop)
workflow.add_node("CycleNode", "cycle", {
"max_iterations": 1000 # Will run all 1000
})
# ✅ CORRECT (with convergence)
workflow.add_node("PythonCodeNode", "check", {
"code": """
if abs(current - previous) < 0.01:
cycle_complete = True