{"record":{"id":"b6a53fd419d323d7","repo":"apache/beam","slug":"no-logical-type-registered-for-urn-s","errorCode":null,"errorMessage":"No logical type registered for URN '%s'","messagePattern":"No logical type registered for URN '(.+?)'","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/typehints/schemas.py","lineNumber":924,"sourceCode":"    # type: (type) -> LogicalType\n\n    \"\"\"Construct an instance of this LogicalType implementation given a typing.\n    \"\"\"\n    raise NotImplementedError()\n\n  @classmethod\n  def from_runner_api(cls, logical_type_proto):\n    # type: (schema_pb2.LogicalType) -> LogicalType\n\n    \"\"\"Construct an instance of a registered LogicalType implementation given a\n    proto LogicalType.\n\n    Raises ValueError if no LogicalType registered for the given URN.\n    \"\"\"\n    logical_type = cls._known_logical_types.get_logical_type_by_urn(\n        logical_type_proto.urn)\n    if logical_type is None:\n      raise ValueError(\n          \"No logical type registered for URN '%s'\" % logical_type_proto.urn)\n    if not logical_type_proto.HasField(\n        \"argument_type\") or not logical_type_proto.HasField(\"argument\"):\n      # logical type_proto without argument\n      return logical_type()\n    else:\n      try:\n        argument = value_from_runner_api(\n            logical_type_proto.argument_type, logical_type_proto.argument)\n      except ValueError:\n        # TODO(https://github.com/apache/beam/issues/23373): Complete support\n        # for logical types that require arguments beyond atomic type.\n        # For now, skip arguments.\n        _LOGGER.warning(\n            'Logical type %s with argument is currently unsupported. '\n            'Argument values are omitted',\n            logical_type_proto.urn)\n        return logical_type()","sourceCodeStart":906,"sourceCodeEnd":942,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/typehints/schemas.py#L906-L942","documentation":"LogicalType.from_runner_api() resolves a schema proto's logical type by its URN. If no registered LogicalType claims that URN it raises ValueError. This happens when decoding a schema produced by another pipeline/SDK version whose logical type is unknown to the current process.","triggerScenarios":"Decoding a runner API schema proto (schema_pb2.Schema with a logical_type field) whose urn (e.g. a custom or newer beam:logical_type:...) has no registered LogicalType in the current Beam version/process.","commonSituations":"Reading data written by a newer Beam version that introduced a logical type URN not present in your installed version; custom logical types registered on the writer side but not imported on the reader side; cross-language pipelines where the Python side lacks the logical type.","solutions":["Upgrade apache-beam to a version that registers the missing logical type URN.","Import/register the custom LogicalType class (with matching urn()) before decoding the schema.","Rewrite the data with an older/simpler schema, or strip/replace the unknown logical type in the proto."],"exampleFix":"// before\nlogical_type = LogicalType.from_runner_api(proto)  # ValueError for unknown urn\n\n// after\nfrom my_pipeline.logical_types import MyLogicalType  # registers urn on import\nLogicalType.register_logical_type(MyLogicalType)\nlogical_type = LogicalType.from_runner_api(proto)","handlingStrategy":"try-catch","validationCode":"from apache_beam.typehints.schemas import LogicalType\n\ndef urn_registered(schema_proto):\n    return all(\n        LogicalType._known_logical_types.get_logical_type_by_urn(lt.urn) is not None\n        for lt in schema_proto.logical_types)","typeGuard":null,"tryCatchPattern":"try:\n    lt = LogicalType.from_runner_api(logical_type_proto)\nexcept ValueError as e:\n    if \"No logical type registered for URN\" in str(e):\n        raise RuntimeError(f\"Beam version lacks logical type {logical_type_proto.urn}; upgrade apache-beam\") from e\n    raise","preventionTips":["Run reader and writer pipelines on the same (or newer) apache-beam version.","Register custom logical types on every worker before reading schema data.","Log unknown URNs early when ingesting external schemas."],"tags":["python","apache-beam","logical-type","urn","serialization"],"backgroundTag":"resource-not-found","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"}