{"record":{"id":"3143e00a7e0a09c8","repo":"pathwaycom/pathway","slug":"unknown-format-only-are-supported","errorCode":null,"errorMessage":"Unknown format: {}. Only {} are supported","messagePattern":"Unknown format: (.+?)\\. Only (.+?) are supported","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/io/fs/__init__.py","lineNumber":353,"sourceCode":"\n    Then, we can also check the output file by executing the command:\n\n    .. code-block:: bash\n\n        cat table.jsonlines\n\n    .. code-block:: json\n\n        {\"age\":10,\"owner\":\"Alice\",\"pet\":\"dog\",\"diff\":1,\"time\":0}\n        {\"age\":9,\"owner\":\"Bob\",\"pet\":\"cat\",\"diff\":1,\"time\":0}\n        {\"age\":8,\"owner\":\"Alice\",\"pet\":\"cat\",\"diff\":1,\"time\":0}\n\n    As one can easily see, the values remain the same, while the format has changed to\n    a plain JSON.\n    \"\"\"\n\n    if format not in SUPPORTED_OUTPUT_FORMATS:\n        raise ValueError(\n            \"Unknown format: {}. Only {} are supported\".format(\n                format, \", \".join(SUPPORTED_OUTPUT_FORMATS)\n            )\n        )\n\n    data_storage = api.DataStorage(storage_type=\"fs\", path=fspath(filename))\n    if format == \"csv\":\n        data_format = api.DataFormat(\n            format_type=\"dsv\",\n            key_field_names=[],\n            value_fields=_format_output_value_fields(table),\n            delimiter=\",\",\n        )\n    elif format == \"json\":\n        data_format = api.DataFormat(\n            format_type=\"jsonlines\",\n            key_field_names=[],\n            value_fields=_format_output_value_fields(table),","sourceCodeStart":335,"sourceCodeEnd":371,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/io/fs/__init__.py#L335-L371","documentation":"Raised by the Pathway filesystem output connector (pw.io.fs.write and CSV/JSON writers built on it) when the `format` argument is not one of SUPPORTED_OUTPUT_FORMATS (csv, json). The connector only knows how to serialize rows into those two formats.","triggerScenarios":"pw.io.fs.write(t, filename=\"out\", format=\"parquet\") or format=\"jsonl\" — any string other than exactly \"csv\" or \"json\".","commonSituations":"Assuming parquet/avro/orc support because other connectors have it; passing \"jsonl\"/\"ndjson\" for newline-delimited JSON (pathway's \"json\" format already writes one JSON object per line); typos like \"CSV\" with uppercase.","solutions":["Use format=\"json\" for newline-delimited JSON output — it already emits one object per line.","Use format=\"csv\" for comma-separated output (see the delimiter options of pw.io.csv.write).","For parquet or other formats, write to a format pathway supports and convert afterwards, or use a different pathway connector that supports your target."],"exampleFix":"# before\npw.io.fs.write(t, filename=\"out.parquet\", format=\"parquet\")\n\n# after\npw.io.fs.write(t, filename=\"out.json\", format=\"json\")","handlingStrategy":"validation","validationCode":"from pathway.io.fs import SUPPORTED_OUTPUT_FORMATS\nassert format in SUPPORTED_OUTPUT_FORMATS, (\n    f\"format must be one of {sorted(SUPPORTED_OUTPUT_FORMATS)}\"\n)","typeGuard":"def is_supported_fs_format(fmt: str) -> bool:\n    from pathway.io.fs import SUPPORTED_OUTPUT_FORMATS\n    return fmt in SUPPORTED_OUTPUT_FORMATS","tryCatchPattern":null,"preventionTips":["Remember pathway's \"json\" output is newline-delimited; use it instead of jsonl/ndjson.","Centralize format strings as constants to avoid typos and casing mistakes."],"tags":["filesystem","format","connector","api-misuse"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}