{"record":{"id":"444a49027ab12e48","repo":"apache/beam","slug":"gcp-project-name-needs-to-be-specified-in-project-pipeline-444a49","errorCode":null,"errorMessage":"GCP project name needs to be specified in \"project\" pipeline\n            option","messagePattern":"GCP project name needs to be specified in \"project\" pipeline\n            option","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/ml/gcp/recommendations_ai.py","lineNumber":126,"sourceCode":"              errors, if any, should be retried.\n            timeout (float): Optional. The amount of time, in seconds, to wait\n              for the request to complete.\n            metadata: Optional. Strings which\n              should be sent along with the request as metadata.\n            catalog_name (str): Optional. Name of the catalog.\n              Default: 'default_catalog'\n        \"\"\"\n    self.project = project\n    self.retry = retry\n    self.timeout = timeout\n    self.metadata = metadata\n    self.catalog_name = catalog_name\n\n  def expand(self, pcoll):\n    if self.project is None:\n      self.project = pcoll.pipeline.options.view_as(GoogleCloudOptions).project\n    if self.project is None:\n      raise ValueError(\n          \"\"\"GCP project name needs to be specified in \"project\" pipeline\n            option\"\"\")\n    pardo = ParDo(\n        _CreateCatalogItemFn(\n            self.project,\n            self.retry,\n            self.timeout,\n            self.metadata,\n            self.catalog_name))\n    return pcoll | pardo.with_outputs(\n        FAILED_CATALOG_ITEMS, main='created_catalog_items')\n\n\nclass _CreateCatalogItemFn(DoFn):\n  def __init__(\n      self,\n      project: str = None,\n      retry: Retry = None,","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/ml/gcp/recommendations_ai.py#L108-L144","documentation":"WriteUserEvent/WritePrediction expand-time guard: the transform's project argument is None and the pipeline's GoogleCloudOptions.project is also unset, so there is no GCP project in which to look up the Recommendations AI catalog/event store.","triggerScenarios":"Thrown at sdks/python/apache_beam/ml/gcp/recommendations_ai.py:126 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass project explicitly to the transform constructor","Set --project on the pipeline options or via options.view_as(GoogleCloudOptions).project"],"exampleFix":null,"handlingStrategy":"validation","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"}