Python Forum
Python Error in subprocess.py - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Python Error in subprocess.py (/thread-14731.html)



Python Error in subprocess.py - roydianton90 - Dec-14-2018

Hello,

I got problem when running command using python. the command purpose is to restore db (RDS) in AWS.
Here are the problem:
Error:
File "/home/rdianton/.local/lib/python2.7/site-packages/python_terraform/__init__.py", line 179, in init return self.cmd('init', *args, **options) File "/home/rdianton/.local/lib/python2.7/site-packages/python_terraform/__init__.py", line 292, in cmd cwd=working_folder, env=environ_vars) File "/usr/lib/python2.7/subprocess.py", line 394, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory
I am new in this forum, please advice if this post is not in the right place.

Thanks in advance.


RE: Python Error in subprocess.py - jeanMichelBain - Dec-14-2018

'No such file or directory' from 'self.cmd('init', *args, **options)'
Probably 'init' is not a command from where it runs. Check execution environment, and tell us more (os, code, etc) if you are not successfull.