{"record":{"id":"b6cbb1ccaa0dcd5d","repo":"apache/beam","slug":"unsupported-artifact-type-s","errorCode":null,"errorMessage":"unsupported artifact type %s","messagePattern":"unsupported artifact type (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/runners/dataflow/internal/apiclient.py","lineNumber":613,"sourceCode":"    total_size = os.path.getsize(from_path)\n    self.stage_file_with_retry(\n        to_folder, to_name, from_path, total_size=total_size)\n\n  def _stage_resources(self, pipeline, options):\n    google_cloud_options = options.view_as(GoogleCloudOptions)\n    if google_cloud_options.staging_location is None:\n      raise RuntimeError('The --staging_location option must be specified.')\n    if google_cloud_options.temp_location is None:\n      raise RuntimeError('The --temp_location option must be specified.')\n\n    resources = []\n    staged_paths = {}\n    staged_hashes = {}\n    for _, env in sorted(pipeline.components.environments.items(),\n                         key=lambda kv: kv[0]):\n      for dep in env.dependencies:\n        if dep.type_urn != common_urns.artifact_types.FILE.urn:\n          raise RuntimeError('unsupported artifact type %s' % dep.type_urn)\n        type_payload = beam_runner_api_pb2.ArtifactFilePayload.FromString(\n            dep.type_payload)\n\n        if dep.role_urn == common_urns.artifact_roles.STAGING_TO.urn:\n          remote_name = (\n              beam_runner_api_pb2.ArtifactStagingToRolePayload.FromString(\n                  dep.role_payload)).staged_name\n          is_staged_role = True\n        else:\n          remote_name = os.path.basename(type_payload.path)\n          is_staged_role = False\n        # compute sha256 even if caching is disabled.\n        # This is used to check the payload integrity along with caching.\n        if not type_payload.sha256:\n          type_payload.sha256 = self._compute_sha256(type_payload.path)\n\n        if type_payload.sha256 and type_payload.sha256 in staged_hashes:\n          _LOGGER.info(","sourceCodeStart":595,"sourceCodeEnd":631,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py#L595-L631","documentation":"While staging pipeline resources, _stage_resources encountered an artifact whose type it does not know how to stage (only known kinds like PYTHON, JAVA, or file artifacts are handled); the offending artifact type is interpolated into the message.","triggerScenarios":"A pipeline environment carries dependencies typed as something other than FILE (e.g. from cross-language expansion services emitting non-file artifact types, or hand-built pipeline protos with custom artifact types).","commonSituations":"Cross-language pipelines where the foreign SDK expansion produces artifact dependencies Dataflow staging cannot handle; custom Beam environments constructed programmatically.","solutions":["Ensure all environment dependencies use artifact type FILE (beam:artifact:type:file:v1)","Regenerate/upgrade the expansion service so cross-language deps are materialized as files","Inspect pipeline.components.environments[].dependencies to find the offending dependency and remove or convert it"],"exampleFix":"# before\ndep = beam_runner_api_pb2.ArtifactInformation(\n    type_urn='beam:artifact:type:url:v1', ...)\n# after\ndep = beam_runner_api_pb2.ArtifactInformation(\n    type_urn='beam:artifact:type:file:v1',\n    type_payload=proto_utils.to_Bytes(\n        beam_runner_api_pb2.ArtifactFilePayload(path='/local/file.jar')))","handlingStrategy":"validation","validationCode":"from apache_beam.portability import common_urns\nfor env in pipeline.proto.components.environments.values():\n    for dep in env.dependencies:\n        assert dep.type_urn == common_urns.artifact_types.FILE.urn, dep.type_urn","typeGuard":null,"tryCatchPattern":"try:\n    job = Job(pipeline, options)\nexcept RuntimeError as e:\n    if 'unsupported artifact type' in str(e):\n        print('Non-file artifact dependency; fix expansion service or pipeline proto')\n    raise","preventionTips":["Keep expansion services and Beam SDK versions aligned so dependencies are emitted as files","Inspect environment dependencies in the pipeline proto before Dataflow submission","Avoid hand-crafting artifact dependencies with non-file type urns"],"tags":["dataflow","artifacts","staging","cross-language"],"backgroundTag":"unsupported-enum-value","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"}