pathwaycom/pathway · error · ValueError
Unexpected argument for {format!r} format: {param}
Error message
Unexpected argument for {format!r} format: {param} What it means
Error "Unexpected argument for {format!r} format: {param}" thrown in pathwaycom/pathway.
Source
Thrown at python/pathway/io/_utils.py:309
csv_settings: CsvParserSettings | None = None,
json_field_paths: dict[str, str] | None = None,
schema_registry_settings: SchemaRegistrySettings | None = None,
with_native_record_key: bool = False,
_stacklevel: int = 1,
) -> tuple[type[Schema], api.DataFormat]:
data_format_type = get_data_format_type(format, SUPPORTED_INPUT_FORMATS)
if data_format_type == "identity":
kwargs = locals()
unexpected_params = [
"schema",
"csv_settings",
"json_field_paths",
"schema_registry_settings",
]
for param in unexpected_params:
if param in kwargs and kwargs[param] is not None:
raise ValueError(f"Unexpected argument for {format!r} format: {param}")
parse_utf8 = format not in ("binary", "only_metadata", "raw")
schema = construct_raw_data_schema_by_flags(
with_native_record_key=with_native_record_key,
parse_utf8=parse_utf8,
with_metadata=with_metadata,
)
schema, api_schema = read_schema(schema)
return schema, api.DataFormat(
format_type=data_format_type,
**api_schema,
parse_utf8=parse_utf8,
key_generation_policy=(
api.KeyGenerationPolicy.ALWAYS_AUTOGENERATE
if autogenerate_key
else api.KeyGenerationPolicy.PREFER_MESSAGE_KEY
),View on GitHub (pinned to fa2f74a464)
Solutions
- Remove the parameter that does not apply to the selected format, or switch to a format that accepts it.
Example fix
pw.io.fs.read(path, format='json', schema=MySchema) # no csv-only params
When it happens
Trigger: Thrown at python/pathway/io/_utils.py:309 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/7ef65a94a7db8314.
Report an issue: GitHub.