Os.system return 2 in python script

I use os.system to launch a python file in python script ,but it returns 2 means ‘No such file or directory’

Hi @1031521414. Can you provide an example of what you’re passing to os.system?

For example I coded os.system(python D:\folder\python_file.py)
It returns 2
But if I coded
os.system(cd D:\folder)
os.system(python python_file.py)
It returns 1
The python file I call is to launch amesim and write a file to record time and force for later use

Hi @1031521414. I wasn’t able to reproduce this issue, but you might want to try forward slashes for the script path or a raw string for os.system.