{"record":{"id":"7dea76fd687988ed","repo":"pathwaycom/pathway","slug":"schemaregistryheader-value-must-be-a-str-got-typ","errorCode":null,"errorMessage":"SchemaRegistryHeader.value must be a str, got {type(self.value).__name__}.","messagePattern":"SchemaRegistryHeader\\.value must be a str, got (.+?)\\.","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"python/pathway/internals/_io_helpers.py","lineNumber":238,"sourceCode":"    Args:\n        key: The header key.\n        value: The header value.\n\n    Returns:\n        The constructed header object\n    \"\"\"\n\n    key: str\n    value: str\n\n    def __post_init__(self):\n        if not isinstance(self.key, str):\n            raise TypeError(\n                f\"SchemaRegistryHeader.key must be a str, got \"\n                f\"{type(self.key).__name__}.\"\n            )\n        if not isinstance(self.value, str):\n            raise TypeError(\n                f\"SchemaRegistryHeader.value must be a str, got \"\n                f\"{type(self.value).__name__}.\"\n            )\n\n\n@dataclasses.dataclass(frozen=True)\nclass SchemaRegistrySettings:\n    \"\"\"\n    Connection settings for the Confluent Schema Registry.\n\n    Args:\n        urls: A list of URLs for connecting to the schema registry. If multiple URLs\n            are provided, they will be used in the specified order.\n        token_authorization: Token used for token-based authorization.\n        username: Username for simple authorization.\n        password: Password for simple authorization. If specified, a username\n            must also be provided.\n        headers: Additional headers to include in HTTP requests to the schema registry.","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/internals/_io_helpers.py#L220-L256","documentation":"pw.io.deltalake.read can reconstruct the original Pathway schema only because pw.io.deltalake.write stores per-column dtype metadata under a Pathway-specific field in the Delta table's field metadata. If none of the Delta columns carry that marker, the table was not written by Pathway and the schema cannot be recovered.","triggerScenarios":"Calling pw.io.deltalake.read on a Delta table created externally (Spark/deltalake-rs/duckdb) or by an older Pathway version that did not embed the metadata.","commonSituations":"Team shares a Delta lake written by a Spark job and tries to consume it with Pathway's typed read; or a table written before the metadata feature shipped in a Pathway upgrade.","solutions":["If you only need the raw values, read with the generic connector and cast afterwards (e.g. pw.io.deltalake.read with an explicit schema or the raw-data path supported by your version).","Re-create the table via pw.io.deltalake.write so the Pathway metadata is embedded.","Check the Pathway version on both writer and reader sides and upgrade the writer to a version that stores the schema metadata."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"from deltalake import DeltaTable\n\n_DELTA_PATHWAY_META = \"pathway\"  # field metadata key used by pathway\ndef has_pathway_schema(uri: str, **opts) -> bool:\n    dt = DeltaTable(uri, storage_options=opts)\n    return any(\n        f.metadata.get(_DELTA_PATHWAY_META) is not None\n        for f in dt.schema().fields\n    )","typeGuard":null,"tryCatchPattern":"try:\n    schema = pw.io.deltalake.read_deltalake_schema(uri)\nexcept ValueError as e:\n    if \"No Pathway table schema\" in str(e):\n        # fall back to untyped read or Spark-written schema definition\n        ...\n    raise","preventionTips":["Standardize on Pathway as the writer for Delta tables that Pathway will read back.","When ingesting third-party Delta tables, define the schema explicitly instead of relying on stored metadata."],"tags":["pathway","deltalake","schema","metadata","interoperability"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}