apache/seatunnel · error · IllegalArgumentException
python.script.path does not point to a readable file: {}
Error message
python.script.path does not point to a readable file: {} What it means
Thrown by PythonSourceReader.validateScriptPath() when the configured python.script.path does not point to an existing regular file. The reader refuses to start a python process for a script it cannot read.
Source
Thrown at seatunnel-connectors-v2/connector-python/src/main/java/org/apache/seatunnel/connectors/seatunnel/python/source/PythonSourceReader.java:297
lifecycleLock.notifyAll();
}
}
if (interrupted) {
Thread.currentThread().interrupt();
if (closeException == null) {
closeException = new IOException("Interrupted while closing python source reader");
}
}
if (closeException != null) {
throw closeException;
}
}
private Path validateScriptPath() {
Path scriptPath = Paths.get(sourceConfig.getPythonScriptPath());
if (!Files.isRegularFile(scriptPath)) {
throw new IllegalArgumentException(
"python.script.path does not point to a readable file: " + scriptPath);
}
return scriptPath;
}
private void configureWorkingDirectory(ProcessBuilder processBuilder, Path scriptPath) {
String workingDirectory = sourceConfig.getPythonWorkingDirectory();
Path processDirectory;
if (workingDirectory != null && !workingDirectory.trim().isEmpty()) {
processDirectory = Paths.get(workingDirectory);
if (!Files.isDirectory(processDirectory)) {
throw new IllegalArgumentException(
"python.working.directory is not a directory: " + processDirectory);
}
} else {
processDirectory = scriptPath.toAbsolutePath().getParent();
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Deploy the script to the exact absolute path on every worker node
- Use an absolute path in python.script.path
- Verify with: test -f /path/to/script.py on each worker
- Package the script with the job or place it in a shared mount
Example fix
// before python.script.path = "scripts/job.py" // after python.script.path = "/opt/seatunnel/scripts/job.py" # present on all workers
Defensive patterns
Strategy: validation
Validate before calling
Path sp = Paths.get(config.getPythonScriptPath());
if (!java.nio.file.Files.isRegularFile(sp))
throw new IllegalArgumentException("python.script.path missing or not a file: " + sp); Prevention
- Use absolute script paths present on every worker node
- Ship scripts with the job or use a shared mount
- Add a deploy-time check: test -f on each worker
When it happens
Trigger: sourceConfig.getPythonScriptPath() points to a nonexistent path, a directory, or a broken symlink when open() -> validateScriptPath() runs on a worker node.
Common situations: Script present on the client machine but not shipped to every worker node; typo in the configured path; path relative to a different working directory; script mounted after job start.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- python.executable does not resolve to an executable file: {}
- AmazonDocumentDB TLS CA bundle is not a readable file:
- Server property {} must contain at least one absolute execut
- Python source allowlist entry must be an absolute path: {}
- Server property {} does not contain a usable absolute path
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/c2b0839e0f57a002.
Report an issue: GitHub.