apache/beam · error · ValueError
No logical type registered for URN
Error message
No logical type registered for URN '%s'
What it means
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.
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.
Example fix
// before logical_type = LogicalType.from_runner_api(proto) # ValueError for unknown urn // after from my_pipeline.logical_types import MyLogicalType # registers urn on import LogicalType.register_logical_type(MyLogicalType) logical_type = LogicalType.from_runner_api(proto)
Defensive patterns
Strategy: try-catch
Validate before calling
from apache_beam.typehints.schemas import LogicalType
def urn_registered(schema_proto):
return all(
LogicalType._known_logical_types.get_logical_type_by_urn(lt.urn) is not None
for lt in schema_proto.logical_types) Try / catch
try:
lt = LogicalType.from_runner_api(logical_type_proto)
except ValueError as e:
if "No logical type registered for URN" in str(e):
raise RuntimeError(f"Beam version lacks logical type {logical_type_proto.urn}; upgrade apache-beam") from e
raise Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Attempted to encode null for non-nullable field
- beam:logical_type:timestamp:v1 requires a precision…
- Decode not implemented
- Encode not implemented
- No fallback.
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/b6a53fd419d323d7.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/python/apache_beam/typehints/schemas.py:924
# type: (type) -> LogicalType
"""Construct an instance of this LogicalType implementation given a typing.
"""
raise NotImplementedError()
@classmethod
def from_runner_api(cls, logical_type_proto):
# type: (schema_pb2.LogicalType) -> LogicalType
"""Construct an instance of a registered LogicalType implementation given a
proto LogicalType.
Raises ValueError if no LogicalType registered for the given URN.
"""
logical_type = cls._known_logical_types.get_logical_type_by_urn(
logical_type_proto.urn)
if logical_type is None:
raise ValueError(
"No logical type registered for URN '%s'" % logical_type_proto.urn)
if not logical_type_proto.HasField(
"argument_type") or not logical_type_proto.HasField("argument"):
# logical type_proto without argument
return logical_type()
else:
try:
argument = value_from_runner_api(
logical_type_proto.argument_type, logical_type_proto.argument)
except ValueError:
# TODO(https://github.com/apache/beam/issues/23373): Complete support
# for logical types that require arguments beyond atomic type.
# For now, skip arguments.
_LOGGER.warning(
'Logical type %s with argument is currently unsupported. '
'Argument values are omitted',
logical_type_proto.urn)
return logical_type()View on GitHub (pinned to 12126d8942)