python 2.7 - Failed to execute subprocess.Popen -


python script:

import subprocess subprocess.popen(['emulator', '-avd', 'autotest', '-no-skin', '-no-audio', '-no-window']) 

output:

fatal: [192.168.0.185]: failed! => {"changed": true, "cmd": ["sudo", "python", "mobile_sdk.py"], "delta": "0:00:00.021230", "end": "2016-04-06 12:26:06.861386", "failed": true, "invocation": {"module_args": {"ansible_check_mode": false, "ansible_debug": false, "_ansible_diff": false, "_ansible_no_log": false, "_ansible_verbosity": 3, "_raw_params": "sudo python mobile_sdk.py", "_uses_shell": false, "chdir": null, "creates": null, "executable": null, "removes": null, "warn": true}, "module_name": "command"}, "rc": 1, "start": "2016-04-06 12:26:06.840156", "stderr": "traceback (most recent call last):\n file \"mobile_sdk.py\", line 2, in \n subprocess.popen(['emulator', '-avd', 'autotest', '-no-skin', '-no-audio', '-no-window'])\n file \"/usr/lib/python2.7/subprocess.py\", line 710, in __init\n errread, errwrite)\n file \"/usr/lib/python2.7/subprocess.py\", line 1327, in _execute_child\n raise child_exception\noserror: [errno 2] no such file or directory", "stdout": "", "stdout_lines": [], "warnings": ["consider using 'become', 'become_method', , 'become_user' rather running sudo"]}

the same script works on ubuntu if run ansible (on same machine) failed


Comments