I am trying to run a Python script and using the instructions in this thread:
The path to the Python script should be specified in the “Arguments” field, not “Application”. Don’t forget to wrap it into quotes as it contains spaces.
If leaving the “Application” field empty doesn’t work, specify in the field the path to the Python executable (i.e. python.exe) in your system.
But I get an error:
Error: External program failed with exit code 2; path=C:\Python\python.exe; args=C:\Users…\script.py; workdir=
Source: action “Run program”, table “Python Script”
Why do you think the problem is in EasyMorph? Does the Python script run successfully if you execute it from the command line in the same folder and under the same Windows account as the EasyMorph project?
Exit code 2 may mean “File not found” in Windows. Exit codes are not produced by EasyMorph, but by Windows or by applications that are executed.
The Script runs without issues using same Windows account and same folders if I am not using EasyMorph (I.e. Using Sublime or Pycharm).
Please post a screenshot with the full action properties so that all paths are visible.
I have like this but parameters are wrapped in quotes due to the spaces in a folder
Thank you very much.
In the meanwhile I made a couple of more tests and it worked by adding a “Working directory” and removing path from the Arguments: