Exec Node Error:127?

Hi Everone,

Quick question, I am trying to generate a QR code ( that I have done before on other projects) with the use of an "EXEC Node" and "qr" command.

in the bash terminal, if I execute the "qr" with some text its does what it suppose to do, generates the QR code, and converts into a minge. But it doesn't seem to work from node-red? Only give me an error:127.

any idea why this is ?

Will appreciate your response

Did you try it with an absolute path in the exec node ?
Try which qr and use that full path.

yes , same error:127 , and rebooted , restarted , reinstalled the exec node, reinstalled Python ....

Ok so you are running a python script in the exec node ? or just qr ? (i fail to see the connection with python)

hi Bakman,

yes, the node generally just work fine . i have used a flow a have previously used on a other project and where it work perfectly . its only "qr" + payload as a string .

Exit code 127 means that the child process cannot find the command.

So if you run a python script from an exec node, in the python script there is probably a call to some command that does not have an absolute path and if that command is not in the default PATH variable, you will get an exit code 127.

On commandline type which qr and use that output in the exec node.

If qr is a python script, you can either edit that script or modify the PATH variable to make it available (check the variable with env | grep PATH - if the command located in the shown directories, then it is a different issue)

Thanks Bakman, let me test this out...dont go to far :wink:

Also put a debug node on output 2 of the exec node. That may give additional information.

BAKMAN , your absolute genius thanks so much. It work perfectly

"qr" to "/home/pi/.local/bin/qr " and it spits the QR image out straightaway!!!

Thank you !!

1 Like

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