pathwaycom/pathway · error · ValueError
'autogenerate_key' is only meaningful for 'raw' or 'plaintex
Error message
'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. What it means
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.
Source
Thrown at python/pathway/io/_utils.py:371
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(
f"'json_field_paths' references field {field_name!r} "
f"which is not in the schema. Known fields: "View on GitHub (pinned to fa2f74a464)
Solutions
- Drop the autogenerate_key argument, or use format='raw'/'plaintext' where it has an effect.
Example fix
pw.io.kafka.write(t, rdkafka_settings, topic_name='t', format='raw', autogenerate_key=True)
When it happens
Trigger: Thrown at python/pathway/io/_utils.py:371 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/839355de48751d19.
Report an issue: GitHub.