I have Docker Swarm with node-red running. I have used a simple flow to try and read a HelloWorld.py script [EXEC] with no joy. I had modified it to “cat /etc/pam.conf” and it works. I am sure I am missing something simple, any assistance would be appreciated.
Error:
payload: "python: can’t open file ‘/home/pi/HelloWorld.py’: [Errno 2] No such file or directory↵"
Export of the flow:
[{"id":"3f0a9383.02189c","type":"tab","label":"Flow 1"},{"id":"83d6a159.11f9a","type":"inject","z":"3f0a9383.02189c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":100,"y":120,"wires":[["1683f7e8.ee1dd8"]]},{"id":"6c98bc6a.acd014","type":"debug","z":"3f0a9383.02189c","name":"","active":true,"console":"false","complete":"true","x":510,"y":120,"wires":[]},{"id":"1683f7e8.ee1dd8","type":"exec","z":"3f0a9383.02189c","command":"python -u /home/pi/HelloWorld.py","addpay":false,"append":"","useSpawn":false,"timer":"","name":"test","x":290,"y":200,"wires":[[],["6c98bc6a.acd014"],["6c98bc6a.acd014"]]}]
pi@pi2:~ $ cat HelloWorld.py
#!/user/bin/python
# Hello World python Program
print "Hello World!";
pi@pi2:~ $ python HelloWorld.py
Hello World!