apache/seatunnel · error · IllegalArgumentException
field_delimiter must not be null
Error message
field_delimiter must not be null
What it means
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.
Source
Thrown at seatunnel-connectors-v2/connector-python/src/main/java/org/apache/seatunnel/connectors/seatunnel/python/source/PythonSourceConfig.java:98
/**
* Phase 1 keeps the stdout contract intentionally narrow so the first implementation can stay
* compatible with the existing text deserializer.
*/
private void validate() {
if (StringUtils.isBlank(pythonExecutable)) {
throw new IllegalArgumentException("python.executable must not be blank");
}
if (StringUtils.isBlank(pythonScriptPath)) {
throw new IllegalArgumentException("python.script.path must not be blank");
}
if (!SUPPORTED_FILE_FORMAT.equalsIgnoreCase(fileFormatType)) {
throw new IllegalArgumentException(
"Unsupported file_format_type: "
+ fileFormatType
+ ". Phase 1 supports only text");
}
if (fieldDelimiter == null) {
throw new IllegalArgumentException("field_delimiter must not be null");
}
}
}
View on GitHub (pinned to cf67b549a7)
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.
Example fix
// before
Python {
# field_delimiter omitted
}
// after
Python {
field_delimiter = ","
} Defensive patterns
Strategy: validation
Validate before calling
// Java: delimiter must be present
Object delim = configMap.get("field_delimiter");
if (delim == null) {
throw new IllegalArgumentException("field_delimiter is required for the Python text source");
} Try / catch
try { cfg = new PythonSourceConfig(configMap); } catch (IllegalArgumentException e) { LOG.error("Invalid python source config: {}", e.getMessage()); } Prevention
- 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
When it happens
Trigger: Omitting field_delimiter from the Python source config; the option resolves to null during validate() and fails immediately.
Common situations: 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.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- python.executable must not be blank
- python.script.path must not be blank
- FILE_SPLIT_FAIL
- Unsupported file_format_type: <fileFormatType>. Phase 1 supp
- The SQL config must contain at least one source table
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/4734736d7cf852ff.
Report an issue: GitHub.