Try using the actual path to the curl executable. Most likely it is not in os.getcwd()
. /usr/bin
is more likely (or possibly /bin
or /usr/local/bin
or some other system-defined location). You can probably find it by using which curl
in a shell.
Or, add the PATH environment variable to your spawnProcess
call -
reactor.spawnProcess(
curlProcess, 'curl', args, env={b"PATH": os.environ[b"PATH"]})
Or, probably even better, add your entire environment:
reactor.spawnProcess(
curlProcess, 'curl', args, env=os.environ)
PATH
controls where the system looks for relative path names like "curl" when trying to execute them. If it is unset, you have to specify an absolute path to be able to execute anything.