pathwaycom/pathway · error · ValueError
Unexpected argument for csv format: json_field_paths
Error message
Unexpected argument for csv format: json_field_paths
What it means
Error "Unexpected argument for csv format: json_field_paths" thrown in pathwaycom/pathway.
Source
Thrown at python/pathway/io/_utils.py:358
f"The schema already declares a {METADATA_COLUMN_NAME!r} column, "
f"which conflicts with 'with_metadata=True'. Either remove "
f"{METADATA_COLUMN_NAME!r} from the schema or set "
"'with_metadata=False'."
)
raise ValueError(
f"{METADATA_COLUMN_NAME!r} is a reserved column name used by "
"Pathway's connector metadata. Declaring it in the schema would "
"be silently shadowed by the connector. Rename your column to "
"something else, or set 'with_metadata=True' to receive the "
"auto-generated metadata in this column."
)
if with_metadata:
schema |= MetadataSchema
schema, api_schema = read_schema(schema)
if data_format_type == "dsv":
if json_field_paths is not None:
raise ValueError("Unexpected argument for csv format: json_field_paths")
return schema, api.DataFormat(
**api_schema,
format_type=data_format_type,
delimiter=",",
schema_registry_settings=maybe_schema_registry_settings(
schema_registry_settings
),
)
elif data_format_type == "jsonlines":
if csv_settings is not None:
raise ValueError("Unexpected argument for json format: csv_settings")
if autogenerate_key:
raise ValueError(
f"'autogenerate_key' is only meaningful for 'raw' or "
f"'plaintext' formats and would have no effect with "
f"{format!r}. Drop it or pick a compatible format."
)
if json_field_paths is not None:View on GitHub (pinned to fa2f74a464)
Solutions
- Remove the json_field_paths argument; it is only valid for the 'json' format.
Example fix
pw.io.csv.read(path, schema=MySchema)
When it happens
Trigger: Thrown at python/pathway/io/_utils.py:358 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/c8e582b6e29ef855.
Report an issue: GitHub.