{"record":{"id":"db91cc5868fdc70b","repo":"apache/seatunnel","slug":"python-executable-must-be-an-absolute-path-or-a-ba","errorCode":null,"errorMessage":"python.executable must be an absolute path or a bare command name: {}","messagePattern":"python\\.executable must be an absolute path or a bare command name: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-python/src/main/java/org/apache/seatunnel/connectors/seatunnel/python/source/PythonSourceExecutionPolicy.java","lineNumber":116,"sourceCode":"                            + \" does not contain a usable absolute path\");\n        }\n        return new ArrayList<>(allowedExecutables);\n    }\n\n    private static Path resolveConfiguredExecutable(String configuredExecutable)\n            throws IOException {\n        Path configuredPath = Paths.get(configuredExecutable);\n        Path resolvedPath;\n        if (configuredPath.isAbsolute()) {\n            resolvedPath = normalize(configuredPath);\n        } else if (configuredPath.getParent() == null) {\n            resolvedPath = resolveCommandFromPath(configuredExecutable);\n            if (resolvedPath == null) {\n                throw new IOException(\n                        \"Unable to resolve python.executable from PATH: \" + configuredExecutable);\n            }\n        } else {\n            throw new IllegalStateException(\n                    \"python.executable must be an absolute path or a bare command name: \"\n                            + configuredExecutable);\n        }\n        if (!Files.isRegularFile(resolvedPath) || !Files.isExecutable(resolvedPath)) {\n            throw new IOException(\n                    \"python.executable does not resolve to an executable file: \" + resolvedPath);\n        }\n        return resolvedPath;\n    }\n\n    private static Path resolveCommandFromPath(String command) {\n        String pathValue = System.getenv(\"PATH\");\n        if (pathValue == null || pathValue.trim().isEmpty()) {\n            return null;\n        }\n        for (String directory : pathValue.split(Pattern.quote(File.pathSeparator))) {\n            if (directory == null || directory.trim().isEmpty()) {\n                continue;","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-python/src/main/java/org/apache/seatunnel/connectors/seatunnel/python/source/PythonSourceExecutionPolicy.java#L98-L134","documentation":"Thrown when python.executable is configured as a relative path containing a directory component (e.g. 'venv/bin/python' or './python'), which the policy rejects: it must be either an absolute path or a bare command name. Relative paths are ambiguous across worker working directories.","triggerScenarios":"Configuring python.executable = 'venv/bin/python' or './bin/python' — a path with a parent that is not absolute — causing resolveConfiguredExecutable to hit the else branch and throw IllegalStateException.","commonSituations":"Copying a relative venv path from a README; assuming the worker's working directory is the project root; portable config files shared between nodes with different layouts.","solutions":["Convert the path to absolute: venv/bin/python -> /opt/app/venv/bin/python","Or drop the directory part and rely on PATH lookup with a bare name like 'python'","Verify the same absolute path exists on every worker node"],"exampleFix":"// before\npythonExecutable = \"venv/bin/python\"\n// after\npythonExecutable = \"/opt/app/venv/bin/python\"","handlingStrategy":"validation","validationCode":"Path p = Paths.get(config.getPythonExecutable());\nif (p.getParent() != null && !p.isAbsolute())\n    throw new IllegalArgumentException(\"python.executable must be absolute or a bare command name\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never configure relative interpreter paths","Normalize with toAbsolutePath() at config load time","Validate config in a preflight job before submission"],"tags":["python","path","configuration"],"backgroundTag":"invalid-argument-format","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"}