{"record":{"id":"839355de48751d19","repo":"pathwaycom/pathway","slug":"autogenerate-key-is-only-meaningful-for-raw-or","errorCode":null,"errorMessage":"'autogenerate_key' is only meaningful for 'raw' or 'plaintext' formats and would have no effect with {format!r}. Drop it or pick a compatible format.","messagePattern":"'autogenerate_key' is only meaningful for 'raw' or 'plaintext' formats and would have no effect with (.+?)\\. Drop it or pick a compatible format\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/io/_utils.py","lineNumber":371,"sourceCode":"        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(\n                        f\"'json_field_paths' references field {field_name!r} \"\n                        f\"which is not in the schema. Known fields: \"","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/io/_utils.py#L353-L389","documentation":"Error \"'autogenerate_key' is only meaningful for 'raw' or 'plaintext' formats and would have no effect with {format!r}. Drop it or pick a compatible format.\" thrown in pathwaycom/pathway.","triggerScenarios":"Thrown at python/pathway/io/_utils.py:371 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Drop the autogenerate_key argument, or use format='raw'/'plaintext' where it has an effect."],"exampleFix":"pw.io.kafka.write(t, rdkafka_settings, topic_name='t', format='raw', autogenerate_key=True)","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"}