Calling openrave python script from a windows service crashes on 'env = Environment()'
I installed openRave 0.9.0 (vc90, python 2.6.6) on my Win8.1 x64 machine. All works well when running python scripts from command line.
When I call the exact same python script from a Windows service via subprocess.Popen('python.exe ravescript.py', etc) (see bottom of email for exact code) I get below error in windows event log when the line 'env = Environment()' is called.
I made sure all paths are correct, I only have python 2.6.6 installed, and even changed compatibility mode of python.exe and openrave.exe to Win7. No difference.
After two days of googling and testing I ran out of options.
Can somebody please advice where the cause/solution can be found?
self.run = True
servicemanager.LogErrorMsg(traceback.format_exc()) # if error print it to event log
os._exit(-1)#return some value other than 0 to os so that service knows to restart
while self.run == True:
#self.env has all required paths
cmd = 'python script.py'
process = subprocess.Popen( cmd,