{"record":{"id":"8a991b953990a83b","repo":"pathwaycom/pathway","slug":"delimiter-is-only-meaningful-for-the-dsv-forma","errorCode":null,"errorMessage":"'delimiter' is only meaningful for the 'dsv' format, but {format!r} was specified. Drop the 'delimiter' argument or use format='dsv'.","messagePattern":"'delimiter' is only meaningful for the 'dsv' format, but (.+?) was specified\\. Drop the 'delimiter' argument or use format='dsv'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/io/_utils.py","lineNumber":453,"sourceCode":"\n    @classmethod\n    def construct(\n        cls,\n        table: Table,\n        *,\n        format: str = \"json\",\n        delimiter: str = \",\",\n        key: ColumnReference | None = None,\n        value: ColumnReference | None = None,\n        headers: Iterable[ColumnReference] | None = None,\n        topic_name: ColumnReference | None = None,\n        schema_registry_settings: SchemaRegistrySettings | None = None,\n        subject: str | None = None,\n        allowed_key_types: tuple[dt.DType, ...] | None = (dt.BYTES, dt.STR, dt.ANY),\n        allowed_value_types: tuple[dt.DType, ...] | None = (dt.BYTES, dt.STR, dt.ANY),\n    ) -> MessageQueueOutputFormat:\n        if delimiter != \",\" and format != \"dsv\":\n            raise ValueError(\n                f\"'delimiter' is only meaningful for the 'dsv' format, but \"\n                f\"{format!r} was specified. Drop the 'delimiter' argument \"\n                f\"or use format='dsv'.\"\n            )\n        if subject is not None and schema_registry_settings is None:\n            raise ValueError(\n                \"'subject' was provided without 'schema_registry_settings'. \"\n                \"The 'subject' parameter only has an effect when a schema \"\n                \"registry is configured; either pass 'schema_registry_settings' \"\n                \"or remove 'subject'.\"\n            )\n        if schema_registry_settings is not None and subject is None:\n            raise ValueError(\n                \"'schema_registry_settings' was provided without 'subject'. \"\n                \"When a schema registry is configured, 'subject' must also be \"\n                \"set so the formatter knows which subject to encode under.\"\n            )\n        if subject is not None and not subject:","sourceCodeStart":435,"sourceCodeEnd":471,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/io/_utils.py#L435-L471","documentation":"Raised by MessageQueueOutputFormat.build when the output format is not 'dsv' but a non-default 'delimiter' was passed. Delimiter only controls field separation for CSV/DSV output; for 'json', 'raw', or 'plaintext' it has no effect, so passing one is treated as a likely mistake (note the default ',' is allowed).","triggerScenarios":"pw.io.kafka.write(table, ..., format='json', delimiter=';'); switching an output from dsv to json while keeping the delimiter argument; reusing one kwargs dict across several writers.","commonSituations":"Shared config dicts reused for multiple sinks; refactoring a CSV output into JSON output without pruning format-specific options.","solutions":["Drop the 'delimiter' argument when format is not 'dsv'.","Or change format to 'dsv' if you actually intended delimited output."],"exampleFix":"# before\npw.io.kafka.write(t, ..., format='json', delimiter=';')\n\n# after\npw.io.kafka.write(t, ..., format='json')","handlingStrategy":"validation","validationCode":"if format != 'dsv':\n    assert delimiter == ',', \"delimiter is only accepted for format='dsv'\"","typeGuard":null,"tryCatchPattern":"try:\n    pw.io.kafka.write(t, ..., format=format, delimiter=delim)\nexcept ValueError as e:\n    if \"'delimiter' is only meaningful\" in str(e):\n        pw.io.kafka.write(t, ..., format=format)  # retry without delimiter\n    else:\n        raise","preventionTips":["Only set 'delimiter' in dsv-specific config branches.","Treat non-default delimiter as a dsv-only option in your config schema."],"tags":["pathway","kafka","output","dsv","delimiter","validation"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}