apache/beam · error · RuntimeError
Re-used coder id
Error message
Re-used coder id: %s %s %s
What it means
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.
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
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at sdks/python/apache_beam/transforms/external.py:948 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/0bf1b6e6c468dfcc.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/python/apache_beam/transforms/external.py:948
for tag, pcoll in self._outputs.items():
pcoll_renames[self._expanded_transform.outputs[tag]] = (
context.pcollections.get_id(pcoll))
def _equivalent(coder1, coder2):
return coder1 == coder2 or _normalize(coder1) == _normalize(coder2)
def _normalize(coder_proto):
normalized = copy.copy(coder_proto)
normalized.spec.environment_id = ''
# TODO(robertwb): Normalize components as well.
return normalized
for id, proto in self._expanded_components.coders.items():
if id.startswith(self._external_namespace):
context.coders.put_proto(id, proto)
elif id in context.coders:
if not _equivalent(context.coders._id_to_proto[id], proto):
raise RuntimeError(
'Re-used coder id: %s\n%s\n%s' %
(id, context.coders._id_to_proto[id], proto))
else:
context.coders.put_proto(id, proto)
for id, proto in self._expanded_components.windowing_strategies.items():
if id.startswith(self._external_namespace):
context.windowing_strategies.put_proto(id, proto)
for id, proto in self._expanded_components.environments.items():
if id.startswith(self._external_namespace):
context.environments.put_proto(id, proto)
for id, proto in self._expanded_components.pcollections.items():
id = pcoll_renames.get(id, id)
if id not in context.pcollections._id_to_obj.keys():
context.pcollections.put_proto(id, proto)
for id, proto in self._expanded_components.transforms.items():
if id.startswith(self._IMPULSE_PREFIX):
# Our fake inputs.View on GitHub (pinned to 12126d8942)