pathwaycom/pathway · error · ValueError

Unexpected argument for json format: csv_settings

Error message

Unexpected argument for json format: csv_settings

What it means

Error "Unexpected argument for json format: csv_settings" thrown in pathwaycom/pathway.

Source

Thrown at python/pathway/io/_utils.py:369

        )
    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:
            schema_columns = set(schema.column_names())
            for field_name, path in json_field_paths.items():
                if field_name == METADATA_COLUMN_NAME:
                    raise ValueError(
                        f"'json_field_paths' cannot be used for "
                        f"{METADATA_COLUMN_NAME!r}: the connector populates "
                        f"this column itself when 'with_metadata=True', so "
                        f"any JSON path would be silently ignored."
                    )
                if field_name not in schema_columns:
                    raise ValueError(

View on GitHub (pinned to fa2f74a464)

Solutions

  1. Remove the csv_settings argument; it is only valid for the 'csv'/'dsv' formats.

Example fix

pw.io.jsonlines.read(path, schema=MySchema)

When it happens

Trigger: Thrown at python/pathway/io/_utils.py:369 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/86b470aa5968ab27. Report an issue: GitHub.