I'm using the killableprocess package (built on top of subprocess) for running processes Whenever I run the "killableprocess.Popen(command)" piece of code in my script I get the following error:
File "killableprocess.py", line 157, in _execute_child
winprocess.AssignProcessToJobObject(self._job, hp)
File "winprocess.py", line 37, in ErrCheckBool
raise WinError()
WindowsError [error 5] Access is denied
Exception TypeError: "'NoneType' object is not callable" in <bound method AutoHANDLE.__del__ of <AutoHANDLE object at 0x025D42B0>> ignored
But when I run it from the python interactive console (python 2.6) it works fine. That probably means there are permission issues when I run this from the script, but I don't know how to solve them. I tried running the script from a cmd that I ran as administrator, but it didn't help. Tried looking for similar posts but didn't find any good solution. Hope to find some help here I'm running on Windows, specifically Windows 7 Ultimate x64, if it's any help.
thanks
os.chdir(other_dir)
before starting the process and that may be true depending on the implementation of the process itself. However you can also just use thecwd=other_dir
argument toPopen
to set the cwd without needing to change it for the script itself. – Irenairene