Python project looks like this:
setup.py
README
Application
scripts
hello.py
shell_scripts
date.sh
From hello.py I’m executing the command subprocess.call(['../shell_scripts/date.sh']) and receiving the error OSError: [Errno 8] Exec format error.
Note: date.sh is a perfectly valid shell script and is executable. I’ve also tried os.path.realpath to no avail.
I assume this is due to an invalid path?
Exec format error will come when the shell isn’t set at the script. try adding
#!/bin/shat the beginning of the script and execute the python script.