pathwaycom/pathway · error · ValueError
Schema must be specified.
Error message
Schema must be specified.
What it means
Error "Schema must be specified." thrown in pathwaycom/pathway.
Source
Thrown at python/pathway/io/_utils.py:255
# the primary key and None. If any (including empty) set of keys if provided,
# then it will be used to compute the primary key.
key_field_names=schema.primary_key_columns(),
value_fields=value_fields,
)
def assert_schema_not_none(
schema: type[Schema] | None,
data_format_type: str | None = None,
) -> type[Schema]:
if schema is None:
if data_format_type == "dsv":
raise ValueError(
"Schema must be specified. "
"Consider using `pw.schema_from_csv` for generating schema from a CSV file"
)
else:
raise ValueError("Schema must be specified.")
else:
return schema
class PlaintextKeySchema(pw.Schema):
key: str
class RawKeySchema(pw.Schema):
key: bytes
def construct_raw_data_schema_by_flags(
*, with_native_record_key: bool, parse_utf8: bool, with_metadata: bool
) -> type[pw.Schema]:
Schema: Any
if parse_utf8:
Schema = PlaintextDataSchemaView on GitHub (pinned to fa2f74a464)
Solutions
- Provide the schema explicitly via the schema parameter of the read call.
Example fix
pw.io.jsonlines.read(path, schema=MySchema)
When it happens
Trigger: Thrown at python/pathway/io/_utils.py:255 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pathwaycom/pathway@fa2f74a464 (2026-08-15).
Data as JSON: /api/errors/e8b8f8faba931051.
Report an issue: GitHub.