# Python file cannot be executed with exec node

**URL:** <https://discourse.nodered.org/t/python-file-cannot-be-executed-with-exec-node/48620>\
**Category:** General\
**Created:** [20 July 2021 05:00 UTC](https://discourse.nodered.org/t/python-file-cannot-be-executed-with-exec-node/48620 "2021-07-20T05:00:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Athurian](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Athurian](https://discourse.nodered.org/u/Athurian)\
**Post date:** [20 July 2021 05:00 UTC](https://discourse.nodered.org/t/python-file-cannot-be-executed-with-exec-node/48620/1 "2021-07-20T05:00:49Z")

</div>

Python file cannot be executed with exec node.

I did it the same way before.

After formatting and updating the Raspberry Pi, the Python file cannot be executed in the exec node.

It works fine in cmd, but not only in node red, what is the reason?

/usr/bin/python /home/pi/soil/soil.py

The argument is 0x20.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [20 July 2021 05:09 UTC](https://discourse.nodered.org/t/python-file-cannot-be-executed-with-exec-node/48620/2 "2021-07-20T05:09:31Z")

</div>

have you flagged the file as executable by the same user that is running node red (presumably pi ?)

Craig

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 July 2021 06:15 UTC](https://discourse.nodered.org/t/python-file-cannot-be-executed-with-exec-node/48620/3 "2021-07-20T06:15:50Z")

</div>

Connect debug nodes to all outputs of the exec mode, set them to show Complete Message and carefully check all the outputs. You should find more information on the problem.

---

<div class="post-metadata">

**Author:** ![Athurian](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Athurian](https://discourse.nodered.org/u/Athurian)\
**Post date:** [21 July 2021 08:26 UTC](https://discourse.nodered.org/t/python-file-cannot-be-executed-with-exec-node/48620/4 "2021-07-21T08:26:50Z")

</div>

Strangely, it seems that there is a problem with the Raspberry Pi. Format it and try again. Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [4 August 2021 08:27 UTC](https://discourse.nodered.org/t/python-file-cannot-be-executed-with-exec-node/48620/5 "2021-08-04T08:27:45Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
