{"record":{"id":"b5d302a4cf4efc71","repo":"apache/beam","slug":"gcp-project-name-needs-to-be-specified-in-project-pipeline-b5d302","errorCode":null,"errorMessage":"GCP project name needs to be specified in \"project\" pipeline option","messagePattern":"GCP project name needs to be specified in \"project\" pipeline option","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/ml/gcp/recommendations_ai.py","lineNumber":232,"sourceCode":"            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.max_batch_size = max_batch_size\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 option')\n    return (\n        pcoll | GroupIntoBatches.WithShardedKey(self.max_batch_size) | ParDo(\n            _ImportCatalogItemsFn(\n                self.project,\n                self.retry,\n                self.timeout,\n                self.metadata,\n                self.catalog_name)))\n\n\nclass _ImportCatalogItemsFn(DoFn):\n  def __init__(\n      self,\n      project=None,\n      retry=None,\n      timeout=120,\n      metadata=None,","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/ml/gcp/recommendations_ai.py#L214-L250","documentation":"expand-time guard in the Recommendations AI write/predict transform: neither the constructor's project argument nor the 'project' pipeline option was set, so the API client cannot be built against any GCP project.","triggerScenarios":"Thrown at sdks/python/apache_beam/ml/gcp/recommendations_ai.py:232 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide project=<project_id> when constructing the transform","Set the project pipeline option: --project=<project_id>"],"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"}