{"record":{"id":"7ef65a94a7db8314","repo":"pathwaycom/pathway","slug":"unexpected-argument-for-format-r-format-param","errorCode":null,"errorMessage":"Unexpected argument for {format!r} format: {param}","messagePattern":"Unexpected argument for (.+?) format: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/io/_utils.py","lineNumber":309,"sourceCode":"    csv_settings: CsvParserSettings | None = None,\n    json_field_paths: dict[str, str] | None = None,\n    schema_registry_settings: SchemaRegistrySettings | None = None,\n    with_native_record_key: bool = False,\n    _stacklevel: int = 1,\n) -> tuple[type[Schema], api.DataFormat]:\n    data_format_type = get_data_format_type(format, SUPPORTED_INPUT_FORMATS)\n\n    if data_format_type == \"identity\":\n        kwargs = locals()\n        unexpected_params = [\n            \"schema\",\n            \"csv_settings\",\n            \"json_field_paths\",\n            \"schema_registry_settings\",\n        ]\n        for param in unexpected_params:\n            if param in kwargs and kwargs[param] is not None:\n                raise ValueError(f\"Unexpected argument for {format!r} format: {param}\")\n\n        parse_utf8 = format not in (\"binary\", \"only_metadata\", \"raw\")\n        schema = construct_raw_data_schema_by_flags(\n            with_native_record_key=with_native_record_key,\n            parse_utf8=parse_utf8,\n            with_metadata=with_metadata,\n        )\n        schema, api_schema = read_schema(schema)\n\n        return schema, api.DataFormat(\n            format_type=data_format_type,\n            **api_schema,\n            parse_utf8=parse_utf8,\n            key_generation_policy=(\n                api.KeyGenerationPolicy.ALWAYS_AUTOGENERATE\n                if autogenerate_key\n                else api.KeyGenerationPolicy.PREFER_MESSAGE_KEY\n            ),","sourceCodeStart":291,"sourceCodeEnd":327,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/io/_utils.py#L291-L327","documentation":"Error \"Unexpected argument for {format!r} format: {param}\" thrown in pathwaycom/pathway.","triggerScenarios":"Thrown at python/pathway/io/_utils.py:309 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the parameter that does not apply to the selected format, or switch to a format that accepts it."],"exampleFix":"pw.io.fs.read(path, format='json', schema=MySchema)  # no csv-only params","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"}