# Run Command - Python error

**URL:** <https://community.easymorph.com/t/run-command-python-error/3511>\
**Category:** General Q&A\
**Created:** [April 5, 2022, 6:34pm UTC](https://community.easymorph.com/t/run-command-python-error/3511 "2022-04-05T18:34:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoMar](https://community.easymorph.com/user_avatar/community.easymorph.com/jomar/32/3157_2.png) [@JoMar](https://community.easymorph.com/u/JoMar)\
**Post date:** [April 5, 2022, 6:34pm UTC](https://community.easymorph.com/t/run-command-python-error/3511/1 "2022-04-05T18:34:51Z")

</div>

Hi,  
I am trying to run a Python script and using the instructions in this thread:

> [@Run Python program](https://community.easymorph.com/t/run-python-program/1175/2):
>
> Hi Christopher, 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. [image]

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"

Thank you.

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [April 5, 2022, 7:58pm UTC](https://community.easymorph.com/t/run-command-python-error/3511/2 "2022-04-05T19:58:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JoMar](https://community.easymorph.com/user_avatar/community.easymorph.com/jomar/32/3157_2.png) [@JoMar](https://community.easymorph.com/u/JoMar)\
**Post date:** [April 5, 2022, 8:29pm UTC](https://community.easymorph.com/t/run-command-python-error/3511/3 "2022-04-05T20:29:48Z")

</div>

Hi,  
The Script runs without issues using same Windows account and same folders if I am not using EasyMorph (I.e. Using Sublime or Pycharm).

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [April 5, 2022, 9:13pm UTC](https://community.easymorph.com/t/run-command-python-error/3511/4 "2022-04-05T21:13:47Z")

</div>

Please post a screenshot with the full action properties so that all paths are visible.

---

<div class="post-metadata">

**Author:** ![JoMar](https://community.easymorph.com/user_avatar/community.easymorph.com/jomar/32/3157_2.png) [@JoMar](https://community.easymorph.com/u/JoMar)\
**Post date:** [April 11, 2022, 2:07pm UTC](https://community.easymorph.com/t/run-command-python-error/3511/5 "2022-04-11T14:07:32Z")

</div>

Hi @dgudkov,  
I have like this but parameters are wrapped in quotes due to the spaces in a folder

 ![image](https://community.easymorph.com/uploads/default/original/2X/c/cb9483db590538f71a0efc3c2065b426f0aa8352.png)

Thank you very much.

---

<div class="post-metadata">

**Author:** ![JoMar](https://community.easymorph.com/user_avatar/community.easymorph.com/jomar/32/3157_2.png) [@JoMar](https://community.easymorph.com/u/JoMar)\
**Post date:** [April 11, 2022, 2:50pm UTC](https://community.easymorph.com/t/run-command-python-error/3511/6 "2022-04-11T14:50:04Z")

</div>

In the meanwhile I made a couple of more tests and it worked by adding a "Working directory" and removing path from the Arguments:

 ![image](https://community.easymorph.com/uploads/default/original/2X/3/37560fa53708f524f038d033958e9ee7664b2c38.png)
