Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 10-04-2018 07:40 PM
Hi
I am trying to execute python script using executestreamcommand processor . it was giving error "No Such file or Directory " even file is available in respective directory
my Flow => Generate file processr --> Execute stream command processor
I was two methods for passing arguments to Execute stream command processor for
Method 1:
${arg1},${argg} are passed by generate file processor
commandarguments :/home/suresh/Desktop/wquest1.py ${arg1};${arg2}
command path : python3.6
Method 2:
commandarguments : wquest1.py ${arg1};${arg2}
command path : python3.6
Working directory : /home/suresh/Desktop/
Please help me on this issue . Thanks for your time and consideration
Created 10-05-2018 04:06 AM
For "command path" you probably want something like: "/usr/bin/python3.6" or "/usr/bin/python3"
You can find the exact path to Python by issuing "which python3" from a shell. It may vary between distributions.
When you execute a script through NiFi it doesn't have the environment variables set like a regular user with shell access might. One of these very important environment variables is PATH, which includes the location of /bin and /usr/bin , so when you type "python" at a shell, it knows where to look for whatever "python" is if it's not found in the current directory.
Created 10-05-2018 04:06 AM
For "command path" you probably want something like: "/usr/bin/python3.6" or "/usr/bin/python3"
You can find the exact path to Python by issuing "which python3" from a shell. It may vary between distributions.
When you execute a script through NiFi it doesn't have the environment variables set like a regular user with shell access might. One of these very important environment variables is PATH, which includes the location of /bin and /usr/bin , so when you type "python" at a shell, it knows where to look for whatever "python" is if it's not found in the current directory.
Created 10-05-2018 07:48 PM
Thanks for your Answer