{"record":{"id":"86b470aa5968ab27","repo":"pathwaycom/pathway","slug":"unexpected-argument-for-json-format-csv-settings","errorCode":null,"errorMessage":"Unexpected argument for json format: csv_settings","messagePattern":"Unexpected argument for json format: csv_settings","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/io/_utils.py","lineNumber":369,"sourceCode":"        )\n    if with_metadata:\n        schema |= MetadataSchema\n\n    schema, api_schema = read_schema(schema)\n    if data_format_type == \"dsv\":\n        if json_field_paths is not None:\n            raise ValueError(\"Unexpected argument for csv format: json_field_paths\")\n        return schema, api.DataFormat(\n            **api_schema,\n            format_type=data_format_type,\n            delimiter=\",\",\n            schema_registry_settings=maybe_schema_registry_settings(\n                schema_registry_settings\n            ),\n        )\n    elif data_format_type == \"jsonlines\":\n        if csv_settings is not None:\n            raise ValueError(\"Unexpected argument for json format: csv_settings\")\n        if autogenerate_key:\n            raise ValueError(\n                f\"'autogenerate_key' is only meaningful for 'raw' or \"\n                f\"'plaintext' formats and would have no effect with \"\n                f\"{format!r}. Drop it or pick a compatible format.\"\n            )\n        if json_field_paths is not None:\n            schema_columns = set(schema.column_names())\n            for field_name, path in json_field_paths.items():\n                if field_name == METADATA_COLUMN_NAME:\n                    raise ValueError(\n                        f\"'json_field_paths' cannot be used for \"\n                        f\"{METADATA_COLUMN_NAME!r}: the connector populates \"\n                        f\"this column itself when 'with_metadata=True', so \"\n                        f\"any JSON path would be silently ignored.\"\n                    )\n                if field_name not in schema_columns:\n                    raise ValueError(","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/io/_utils.py#L351-L387","documentation":"Error \"Unexpected argument for json format: csv_settings\" thrown in pathwaycom/pathway.","triggerScenarios":"Thrown at python/pathway/io/_utils.py:369 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the csv_settings argument; it is only valid for the 'csv'/'dsv' formats."],"exampleFix":"pw.io.jsonlines.read(path, schema=MySchema)","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}