I am currently running subprocess with the specified arguments I have below. Everything appears to run fine. The generated output is as expected & the log generated shows no errors.
exit_code = subprocess.run([cmd, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11], capture_output=True)
However I get a return code / exit code of 2.
The stderr & stdout show the following when I print the exit_code above.
returncode=2, stderr=b'', stdout=b''
Why would I get expected output & no errors in log but still get an exit code of 2? Is there a way to figure out why the exit code is returning 2? What does b'' mean for stderr & stdout?
I am running a SAS program with subprocess.run. This only occurs for some SAS programs. The one's that it does occur for seem to generate pdf files. Also, if I use the exact same arguments specified in subprocess.run into a .bat file it runs fine with an exit code of 0.
cmd. Are you allowed to show the command being run ?