{"record":{"id":"17d619088b7840e1","repo":"apache/beam","slug":"no-such-coder-s","errorCode":null,"errorMessage":"No such coder: %s","messagePattern":"No such coder: (.+?)","errorType":"exception","errorClass":"KeyError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/runners/worker/bundle_processor.py","lineNumber":1552,"sourceCode":"\n  def extract_timers_info(self) -> dict[tuple[str, str], TimerInfo]:\n    timers_info = {}\n    for transform_id, transform_proto in self.descriptor.transforms.items():\n      if transform_proto.spec.urn == common_urns.primitives.PAR_DO.urn:\n        pardo_payload = proto_utils.parse_Bytes(\n            transform_proto.spec.payload, beam_runner_api_pb2.ParDoPayload)\n        for (timer_family_id,\n             timer_family_spec) in pardo_payload.timer_family_specs.items():\n          timer_coder_impl = self.get_coder(\n              timer_family_spec.timer_family_coder_id).get_impl()\n          # The output_stream should be updated when processing a bundle.\n          timers_info[(transform_id, timer_family_id)] = TimerInfo(\n              timer_coder_impl=timer_coder_impl)\n    return timers_info\n\n  def get_coder(self, coder_id: str) -> coders.Coder:\n    if coder_id not in self.descriptor.coders:\n      raise KeyError(\"No such coder: %s\" % coder_id)\n    coder_proto = self.descriptor.coders[coder_id]\n    if coder_proto.spec.urn:\n      return self.context.coders.get_by_id(coder_id)\n    else:\n      # No URN, assume cloud object encoding json bytes.\n      return operation_specs.get_coder_from_spec(\n          json.loads(coder_proto.spec.payload.decode('utf-8')))\n\n  def get_windowed_coder(self, pcoll_id: str) -> WindowedValueCoder:\n    coder = self.get_coder(self.descriptor.pcollections[pcoll_id].coder_id)\n    # TODO(robertwb): Remove this condition once all runners are consistent.\n    if not isinstance(coder, WindowedValueCoder):\n      windowing_strategy = self.descriptor.windowing_strategies[\n          self.descriptor.pcollections[pcoll_id].windowing_strategy_id]\n      return WindowedValueCoder(\n          coder, self.get_coder(windowing_strategy.window_coder_id))\n    else:\n      return coder","sourceCodeStart":1534,"sourceCodeEnd":1570,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/runners/worker/bundle_processor.py#L1534-L1570","documentation":"get_coder looks up a coder by id in the process bundle descriptor; if the id is absent it raises KeyError('No such coder'). The pipeline proto referenced a coder id that was never registered/described to the worker, indicating the descriptor is incomplete or inconsistent.","triggerScenarios":"process_bundle_descriptor.coders lacks the requested coder_id when building operations (bundle_processor.py get_coder), typically due to a pipeline graph translation bug or a descriptor serialized/staged without all coders.","commonSituations":"Version mismatch between pipeline submission SDK and worker SDK dropping coders; custom/combined coders not propagated in cross-language pipelines; manually edited or cached pipeline protos.","solutions":["Use matching apache_beam versions on submission and worker sides so all coders are staged","Regenerate/upgrade the job graph (rerun the pipeline) if a stale cached descriptor is in use","Check the pipeline proto (descriptor.coders) to see which coder id is missing and why translation skipped it","If using cross-language transforms, upgrade both sides' expansion service/SDK versions"],"exampleFix":"# before: apache-beam==2.46.0 submission, 2.50.0 workers\n// after: pin both\npip install apache-beam==2.50.0\n# and rebuild the worker image with the same version","handlingStrategy":"try-catch","validationCode":"def coders_complete(descriptor):\n    referenced = {c for t in descriptor.transforms.values() for c in referenced_coder_ids(t)}\n    missing = referenced - set(descriptor.coders)\n    return not missing, missing\n# call on the process_bundle_descriptor before execution if you build it yourself","typeGuard":null,"tryCatchPattern":"try:\n    coder = bundle_processor.get_coder(coder_id)\nexcept KeyError as e:\n    if 'No such coder' in str(e):\n        logging.error('Coder %s missing from descriptor; re-staging pipeline with matching SDK version', coder_id)\n        raise\n    raise","preventionTips":["Use identical apache_beam versions on submission and worker sides","Avoid caching/staging stale pipeline protos across version upgrades","For cross-language pipelines, verify expansion services register all coders","Log descriptor.coders keys when building custom operations"],"tags":["apache-beam","python","coder","deserialization"],"backgroundTag":"record-not-found","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}