apache/beam · error · ValueError
Unrecognized type_info
Error message
Unrecognized type_info: {type_info!r} What it means
`typing_from_runner_api` dispatches on the FieldType proto's WhichOneof('type_info'). If the discriminator is none of the known branches (atomic_type, array_type, map_type, row_type, iterable_type, logical_type, etc.), it raises this ValueError — the proto contains a type_info value this SDK version doesn't understand.
Solutions
- Upgrade apache-beam to match the producer's protocol version
- Identify the unexpected type_info value from the message and restructure the schema to use supported types
- Regenerate/re-export the schema with an older-compatible SDK
Defensive patterns
Strategy: try-catch
Validate before calling
info = fieldtype_proto.WhichOneof('type_info')
known = {'atomic_type','array_type','map_type','row_type','iterable_type','logical_type'}
assert info in known, f'unknown type_info {info}' Try / catch
try: pytype = converter.typing_from_runner_api(fieldtype) except ValueError as e: raise SchemaDecodeError(str(e)) from e
Prevention
- Use the same Beam version across all SDKs in the pipeline
- Re-export cached schema protos when upgrading Beam
When it happens
Trigger: Decoding a FieldType proto with an unrecognized type_info, typically protos emitted by a newer Beam runner/SDK or another language SDK using a type not yet supported in Python.
Common situations: Mixed SDK versions in cross-language pipelines; deserializing cached schema protos written by a newer Beam release.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Encountered option with unsupported type. Only atomic_type…
- Failed to decode schema due to an issue with Field proto
- Unrecognized atomic_type
- Unrecognized atomic_type
- Unrecognized type_info
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/073723cced296d72.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/python/apache_beam/typehints/schemas.py:626
else:
return row_type.RowTypeConstraint.from_user_type(
user_type,
schema_options=schema_options,
field_options=field_options)
elif type_info == "logical_type":
if fieldtype_proto.logical_type.urn == PYTHON_ANY_URN:
return Any
else:
return LogicalType.from_runner_api(
fieldtype_proto.logical_type).language_type()
elif type_info == "iterable_type":
return Sequence[self.typing_from_runner_api(
fieldtype_proto.iterable_type.element_type)]
else:
raise ValueError(f"Unrecognized type_info: {type_info!r}")
def named_tuple_from_schema(self, schema: schema_pb2.Schema) -> type:
from apache_beam import coders
type_name = 'BeamSchema_{}'.format(schema.id.replace('-', '_'))
subfields = []
descriptions = {}
for field in schema.fields:
try:
field_py_type = self.typing_from_runner_api(field.type)
if isinstance(field_py_type, row_type.RowTypeConstraint):
field_py_type = field_py_type.user_type
except ValueError as e:
raise ValueError(
"Failed to decode schema due to an issue with Field proto:\n\n"
f"{text_format.MessageToString(field)}") from e
View on GitHub (pinned to 12126d8942)