0
votes

I'm not able to run a Python script from ExecuteStreamCommand.

These are the processor properties: Command arguments: /home/directory/test.py Command path: /bin/python3 Working directory: /home/directory

Error message: Traceback (most recent call last): File "/home/test.py", line 1, in import nipyapi ModuleNotFoundError: No module named 'nipyapi'

1
Please check if the nipapi module is installed in your current python PIP. You can check it by executing $ pip list command. It's more convenient to install and use a python virtual env, and after enabling the venv, you can install your pip modules, and then execute your scripts. - Jay
If you are using NiFi cluster, then you need to install nipapi module on all the NiFi nodes. - Vikramsinh Shinde

1 Answers

0
votes

The way that I am able to get ExecuteStreamCommand processor to run python scripts with imported modules is to install the imported modules on the actual machine itself. Therefore, this means running pip or pip3 install {insert module name} on the command prompt for each system that this processor is running on.