Support Questions

Find answers, ask questions, and share your expertise

No module name Selenium

avatar
Rising Star

I want to run python script using ExecuteScript processor and my script has Selenium module to refer to as well. The Selenium module is written in Python language and I believe, it should run in the processor. 
Below are few lines of code depicting how I have added the modules:

import sys
sys.path.append(r"C:/Python311/Lib/site-packages/selenium/")
sys.path.append(r"C:/Python311/Lib/site-packages/requests/")
from org.apache.commons.io import IOUtils
from java.nio.charset import StandardCharsets
from org.apache.nifi.processor.io import StreamCallback

Notice that after appending module in the path, I am not using "from module_name import.." command. However, in the code, the modules are not being fetched and it gives me error. 

Any help is appreciated. 

1 REPLY 1

avatar
Super Collaborator

As far as I know, NiFi leverage Jython and would currently limit you to using Python 2.7 compatible code and only modules written in pure Python.

Home | Jython