{"record":{"id":"a0ea2dca75577879","repo":"apache/seatunnel","slug":"python-script-path-must-not-be-blank","errorCode":null,"errorMessage":"python.script.path must not be blank","messagePattern":"python\\.script\\.path must not be blank","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":89,"sourceCode":"\n    public String getFileFormatType() {\n        return fileFormatType;\n    }\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":71,"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#L71-L102","documentation":"PythonSourceConfig.validate() throws this IllegalArgumentException when python.script.path is null, empty, or blank. The Python source must know which script file to run, so a missing script path is a fatal config validation error.","triggerScenarios":"Constructing PythonSourceConfig where the python.script.path option is absent or set to blank; validate() is invoked during config creation before any data flow starts.","commonSituations":"Config template placeholders left unfilled; script path expected to be inherited from another config section but is not; typo in option name so the real value is never read.","solutions":["Set python.script.path to the absolute path of the Python script, e.g. \"/opt/jobs/transform.py\".","Confirm the option key spelling matches the connector's documented Option name.","Ensure the script file exists and is readable on all worker nodes.","Check for empty-string values produced by variable interpolation in generated configs."],"exampleFix":"// before\nPython {\n  python.script.path = \"\"\n}\n// after\nPython {\n  python.script.path = \"/opt/jobs/transform.py\"\n}","handlingStrategy":"validation","validationCode":"// Java: check script path before building config\nString script = configMap.get(\"python.script.path\");\nif (script == null || script.trim().isEmpty()) {\n    throw new IllegalArgumentException(\"python.script.path is required and must not be blank\");\n}\nif (!java.nio.file.Files.isReadable(java.nio.file.Path.of(script))) {\n    throw new IllegalArgumentException(\"python.script.path not readable on this node: \" + script);\n}","typeGuard":null,"tryCatchPattern":"try { cfg = new PythonSourceConfig(configMap); } catch (IllegalArgumentException e) { LOG.error(\"Invalid python source config: {}\", e.getMessage()); }","preventionTips":["Use absolute script paths present on all worker nodes","Verify option key spelling against the connector's Option names","Validate generated configs after variable interpolation"],"tags":["python","config-validation","required-option"],"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"}