{"record":{"id":"0bf1b6e6c468dfcc","repo":"apache/beam","slug":"re-used-coder-id-s-s-s","errorCode":null,"errorMessage":"Re-used coder id: %s\n%s\n%s","messagePattern":"Re-used coder id: (.+?)\n(.+?)\n(.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/transforms/external.py","lineNumber":948,"sourceCode":"    for tag, pcoll in self._outputs.items():\n      pcoll_renames[self._expanded_transform.outputs[tag]] = (\n          context.pcollections.get_id(pcoll))\n\n    def _equivalent(coder1, coder2):\n      return coder1 == coder2 or _normalize(coder1) == _normalize(coder2)\n\n    def _normalize(coder_proto):\n      normalized = copy.copy(coder_proto)\n      normalized.spec.environment_id = ''\n      # TODO(robertwb): Normalize components as well.\n      return normalized\n\n    for id, proto in self._expanded_components.coders.items():\n      if id.startswith(self._external_namespace):\n        context.coders.put_proto(id, proto)\n      elif id in context.coders:\n        if not _equivalent(context.coders._id_to_proto[id], proto):\n          raise RuntimeError(\n              'Re-used coder id: %s\\n%s\\n%s' %\n              (id, context.coders._id_to_proto[id], proto))\n      else:\n        context.coders.put_proto(id, proto)\n    for id, proto in self._expanded_components.windowing_strategies.items():\n      if id.startswith(self._external_namespace):\n        context.windowing_strategies.put_proto(id, proto)\n    for id, proto in self._expanded_components.environments.items():\n      if id.startswith(self._external_namespace):\n        context.environments.put_proto(id, proto)\n    for id, proto in self._expanded_components.pcollections.items():\n      id = pcoll_renames.get(id, id)\n      if id not in context.pcollections._id_to_obj.keys():\n        context.pcollections.put_proto(id, proto)\n\n    for id, proto in self._expanded_components.transforms.items():\n      if id.startswith(self._IMPULSE_PREFIX):\n        # Our fake inputs.","sourceCodeStart":930,"sourceCodeEnd":966,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/transforms/external.py#L930-L966","documentation":"While merging the external transform's components into the pipeline, a coder id generated inside the external namespace collided with one already registered in the context; component ids must be unique, so the merge aborts rather than silently aliasing coders.","triggerScenarios":"Thrown at sdks/python/apache_beam/transforms/external.py:948 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry pipeline construction: the ids are UUID-based and collisions are effectively random","If reproducible, report to Beam devs with the coder protos from the message"],"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"}