I am using the subprocess() which has subprocess.run() as shown below:
p = subprocess.run([
'/home/ubuntu/my_script.sh',
'my_arg_1',
'my_arg_2'
])
When I run the above command after a few seconds it just gives me a hand full of files as if it didn't even run. It doesn't throw me any error.
I have run the below code in the shell
$ /home/ubuntu/my_script.sh my_arg_1 my_arg_2
The above code runs a few more seconds more compared to the previous code. I have cross-checked many times if there is any mistake, between the Linux code and the concatenation of argument code.
Would there be a permission issue? Can anyone help me?
I am sharing the actual command as shown below:
/home/ubuntu/DataScience/alphapose_dress.sh /home/ubuntu/dresses/whole-dresses/VahT2ei1no.jpg /home/ubuntu/dresses/alphapose_results
So this, not the path issue either
The second code:
cmd = [
config.alphapose_script,
img_path,
config.alphapose_outdir
with Popen(cmd, stdout=PIPE, bufsize=1, universal_newlines=True) as p:
for line in p.stdout:
print(line, end='')
It prints nothing. Can somebody help me?