{"record":{"id":"a7284f8de510baed","repo":"apache/beam","slug":"result-output","errorCode":null,"errorMessage":"${result.output}","messagePattern":"\\$\\{result\\.output\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"sdks/typescript/src/apache_beam/utils/service.ts","lineNumber":423,"sourceCode":"      __dirname,\n      \"..\",\n      \"..\",\n      \"..\",\n      \"resources\",\n      \"bootstrap_beam_venv.py\",\n    );\n    console.debug(\"Invoking Python bootstrap script.\");\n    const result = childProcess.spawnSync(\n      PythonService.whichPython(),\n      [bootstrapScript],\n      { encoding: \"latin1\" },\n    );\n    if (result.status === 0) {\n      console.debug(result.stdout);\n      const lines = result.stdout.trim().split(\"\\n\");\n      return lines[lines.length - 1];\n    } else {\n      throw new Error(result.output);\n    }\n  }\n\n  static forModule(module: string, args: string[] = []): Service {\n    let pythonExecutable: string;\n    let serviceInfo = serviceOverrideFor(\"python:\" + module);\n    if (!serviceInfo) {\n      serviceInfo = serviceOverrideFor(\"python:*\");\n    }\n    if (serviceInfo) {\n      if (serviceInfo.match(/^[a-zA-Z0-9.]+:[0-9]+$/)) {\n        return new ExternalService(serviceInfo);\n      } else {\n        pythonExecutable = serviceInfo;\n      }\n    } else {\n      pythonExecutable = PythonService.beamPython();\n    }","sourceCodeStart":405,"sourceCodeEnd":441,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/typescript/src/apache_beam/utils/service.ts#L405-L441","documentation":"The Python venv bootstrap subprocess (bootstrap_beam_venv.py run via spawnSync) exited non-zero, and this error re-throws the child's combined output as the message. It is a wrapper around an external-process failure: the real cause (Python missing, network failure fetching packages, script crash) is inside result.output; the faulty input is the local Python environment used by PythonService.whichPython().","triggerScenarios":"Thrown at sdks/typescript/src/apache_beam/utils/service.ts:423 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run the bootstrap script manually with the same interpreter (python3 resources/bootstrap_beam_venv.py) to see the full traceback.","Verify PythonService.whichPython() resolves to a working Python 3 interpreter on PATH.","Check network access/proxies needed to create the Beam venv, then retry the operation."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}