{"record":{"id":"c2b0839e0f57a002","repo":"apache/seatunnel","slug":"python-script-path-does-not-point-to-a-readable-fi","errorCode":null,"errorMessage":"python.script.path does not point to a readable file: {}","messagePattern":"python\\.script\\.path does not point to a readable file: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-python/src/main/java/org/apache/seatunnel/connectors/seatunnel/python/source/PythonSourceReader.java","lineNumber":297,"sourceCode":"                lifecycleLock.notifyAll();\n            }\n        }\n\n        if (interrupted) {\n            Thread.currentThread().interrupt();\n            if (closeException == null) {\n                closeException = new IOException(\"Interrupted while closing python source reader\");\n            }\n        }\n        if (closeException != null) {\n            throw closeException;\n        }\n    }\n\n    private Path validateScriptPath() {\n        Path scriptPath = Paths.get(sourceConfig.getPythonScriptPath());\n        if (!Files.isRegularFile(scriptPath)) {\n            throw new IllegalArgumentException(\n                    \"python.script.path does not point to a readable file: \" + scriptPath);\n        }\n        return scriptPath;\n    }\n\n    private void configureWorkingDirectory(ProcessBuilder processBuilder, Path scriptPath) {\n        String workingDirectory = sourceConfig.getPythonWorkingDirectory();\n        Path processDirectory;\n        if (workingDirectory != null && !workingDirectory.trim().isEmpty()) {\n            processDirectory = Paths.get(workingDirectory);\n            if (!Files.isDirectory(processDirectory)) {\n                throw new IllegalArgumentException(\n                        \"python.working.directory is not a directory: \" + processDirectory);\n            }\n        } else {\n            processDirectory = scriptPath.toAbsolutePath().getParent();\n        }\n","sourceCodeStart":279,"sourceCodeEnd":315,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-python/src/main/java/org/apache/seatunnel/connectors/seatunnel/python/source/PythonSourceReader.java#L279-L315","documentation":"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.","triggerScenarios":"sourceConfig.getPythonScriptPath() points to a nonexistent path, a directory, or a broken symlink when open() -> validateScriptPath() runs on a worker node.","commonSituations":"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.","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"],"exampleFix":"// before\npython.script.path = \"scripts/job.py\"\n// after\npython.script.path = \"/opt/seatunnel/scripts/job.py\"  # present on all workers","handlingStrategy":"validation","validationCode":"Path sp = Paths.get(config.getPythonScriptPath());\nif (!java.nio.file.Files.isRegularFile(sp))\n    throw new IllegalArgumentException(\"python.script.path missing or not a file: \" + sp);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["python","filesystem","configuration","file-not-found"],"backgroundTag":"file-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}