{"record":{"id":"4734736d7cf852ff","repo":"apache/seatunnel","slug":"field-delimiter-must-not-be-null","errorCode":null,"errorMessage":"field_delimiter must not be null","messagePattern":"field_delimiter must not be null","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":98,"sourceCode":"    /**\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":80,"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#L80-L102","documentation":"PythonSourceConfig.validate() throws this IllegalArgumentException when field_delimiter is null. Because the output format is text, the delimiter used to join/parse fields is mandatory and must be explicitly configured.","triggerScenarios":"Omitting field_delimiter from the Python source config; the option resolves to null during validate() and fails immediately.","commonSituations":"Assuming a default delimiter is applied when the option is absent; copying a minimal config example without the delimiter line; option name typo causing null resolution.","solutions":["Add field_delimiter to the config, e.g. field_delimiter = \",\".","Use an explicit delimiter character matching what the Python script reads/writes.","Verify the option key spelling against the connector's Option definitions.","Note the check is for null, not blank — an empty string may pass; still set a meaningful delimiter."],"exampleFix":"// before\nPython {\n  # field_delimiter omitted\n}\n// after\nPython {\n  field_delimiter = \",\"\n}","handlingStrategy":"validation","validationCode":"// Java: delimiter must be present\nObject delim = configMap.get(\"field_delimiter\");\nif (delim == null) {\n    throw new IllegalArgumentException(\"field_delimiter is required for the Python text source\");\n}","typeGuard":null,"tryCatchPattern":"try { cfg = new PythonSourceConfig(configMap); } catch (IllegalArgumentException e) { LOG.error(\"Invalid python source config: {}\", e.getMessage()); }","preventionTips":["Always set field_delimiter explicitly, e.g. \",\"","Match the delimiter with what the Python script emits/parses","Keep a complete minimal config template for the Python source"],"tags":["python","config-validation","required-option","delimiter"],"backgroundTag":"missing-required-config-field","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"}