{"record":{"id":"9f442f6a8bc5e71a","repo":"apache/seatunnel","slug":"unsupported-file-format-type-fileformattype-ph","errorCode":null,"errorMessage":"Unsupported file_format_type: <fileFormatType>. Phase 1 supports only text","messagePattern":"Unsupported file_format_type: <fileFormatType>\\. Phase 1 supports only text","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-python/src/main/java/org/apache/seatunnel/connectors/seatunnel/python/source/PythonSourceConfig.java","lineNumber":92,"sourceCode":"    }\n\n    public String getFieldDelimiter() {\n        return fieldDelimiter;\n    }\n\n    /**\n     * Phase 1 keeps the stdout contract intentionally narrow so the first implementation can stay\n     * compatible with the existing text deserializer.\n     */\n    private void validate() {\n        if (StringUtils.isBlank(pythonExecutable)) {\n            throw new IllegalArgumentException(\"python.executable must not be blank\");\n        }\n        if (StringUtils.isBlank(pythonScriptPath)) {\n            throw new IllegalArgumentException(\"python.script.path must not be blank\");\n        }\n        if (!SUPPORTED_FILE_FORMAT.equalsIgnoreCase(fileFormatType)) {\n            throw new IllegalArgumentException(\n                    \"Unsupported file_format_type: \"\n                            + fileFormatType\n                            + \". Phase 1 supports only text\");\n        }\n        if (fieldDelimiter == null) {\n            throw new IllegalArgumentException(\"field_delimiter must not be null\");\n        }\n    }\n}\n","sourceCodeStart":74,"sourceCodeEnd":102,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-python/src/main/java/org/apache/seatunnel/connectors/seatunnel/python/source/PythonSourceConfig.java#L74-L102","documentation":"PythonSourceConfig.validate() throws this IllegalArgumentException when file_format_type is anything other than 'text' (case-insensitive). Phase 1 of this connector deliberately restricts output deserialization to the text format, so other formats are rejected at config validation.","triggerScenarios":"Setting file_format_type = \"json\" (or csv, parquet, etc.) in a Python source config; validate() compares the parsed format type against SUPPORTED_FILE_FORMAT and fails for any mismatch.","commonSituations":"Reusing a file sink/source config snippet that uses json format; upgrading from docs or examples assuming broader format support; assuming case sensitivity matters (it does not — 'TEXT' is accepted).","solutions":["Change file_format_type to \"text\".","Remove the file_format_type line if the default already is text.","Pre-transform data to plain text lines inside the Python script if structured parsing is needed.","Check connector release notes for later phases that may add more formats."],"exampleFix":"// before\nPython {\n  file_format_type = \"json\"\n}\n// after\nPython {\n  file_format_type = \"text\"\n}","handlingStrategy":"validation","validationCode":"// Java: only allow the Phase 1 format\nString fmt = configMap.getOrDefault(\"file_format_type\", \"text\");\nif (!\"text\".equalsIgnoreCase(fmt)) {\n    throw new IllegalArgumentException(\"file_format_type must be 'text' (Phase 1), got: \" + fmt);\n}","typeGuard":null,"tryCatchPattern":"try { cfg = new PythonSourceConfig(configMap); } catch (IllegalArgumentException e) { LOG.error(\"Invalid python source config: {}\", e.getMessage()); }","preventionTips":["Only configure file_format_type = text for the Python source","Do not copy file_format_type from file sink/source examples","Check the connector version's supported format list"],"tags":["python","config-validation","unsupported-value","file-format"],"backgroundTag":"unsupported-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}