{"record":{"id":"99269f93e8185287","repo":"n8n-io/n8n","slug":"python-script-produced-no-output-stderr-stderr","errorCode":null,"errorMessage":"Python script produced no output. stderr: ${stderr || 'none'}. Command: uvx ${args.join(' ')}","messagePattern":"Python script produced no output\\. stderr: (.+?)\\. Command: uvx (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/ai-workflow-builder.ee/evaluations/programmatic/evaluators/workflow-similarity.ts","lineNumber":161,"sourceCode":"\t\t\tstdout = result.stdout;\n\t\t\tstderr = result.stderr;\n\t\t} catch (execError) {\n\t\t\t// Python script may exit with non-zero code if similarity is below threshold\n\t\t\t// But it still outputs valid JSON, so we should use it\n\t\t\tif (isExecError(execError)) {\n\t\t\t\tstdout = execError.stdout ?? '';\n\t\t\t\tstderr = execError.stderr ?? '';\n\t\t\t}\n\n\t\t\t// Only throw if we don't have valid output\n\t\t\tif (!stdout || stdout.trim() === '') {\n\t\t\t\tthrow execError;\n\t\t\t}\n\t\t}\n\n\t\t// Check if stdout is empty\n\t\tif (!stdout || stdout.trim() === '') {\n\t\t\tthrow new Error(\n\t\t\t\t`Python script produced no output. stderr: ${stderr || 'none'}. Command: uvx ${args.join(' ')}`,\n\t\t\t);\n\t\t}\n\n\t\t// Parse result\n\t\tconst parsed: unknown = JSON.parse(stdout);\n\n\t\tif (!isWorkflowSimilarityResult(parsed)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Invalid response from Python script. Expected WorkflowSimilarityResult shape but got: ${stdout.slice(0, 200)}`,\n\t\t\t);\n\t\t}\n\n\t\t// Convert Python result to SingleEvaluatorResult format\n\t\tconst violations = parsed.top_edits.map((edit) => ({\n\t\t\tname: mapEditTypeToViolationName(edit.type),\n\t\t\ttype: edit.priority,\n\t\t\tdescription: edit.description,","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/ai-workflow-builder.ee/evaluations/programmatic/evaluators/workflow-similarity.ts#L143-L179","documentation":"Error \"Python script produced no output. stderr: ${stderr || 'none'}. Command: uvx ${args.join(' ')}\" thrown in n8n-io/n8n.","triggerScenarios":"Thrown at packages/@n8n/ai-workflow-builder.ee/evaluations/programmatic/evaluators/workflow-similarity.ts:161 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}