Hope you are all well and safe. I wrote a small script in python script (1=>1) with importing the whois library, but when I am running the script it keeps telling me ModuleNotFoundError. this is the whole error i get while I am running the script:
ERROR Python Script (1⇒1) 3:341 Execute failed: No module named ‘whois’
Traceback (most recent call last):
File “”, line 2, in
ModuleNotFoundError: No module named 'whois
I tried to figure out how to import and use an external python module in KNIME and came up with this setting how to use external python scripts from (a) separate file(s).
Thank you very much for your reply. I tried both of them but still, get the same error that no module named whois. I also tried other python nodes but the same error occurs every time. Is there another way to fix this problem?
Thank you very much for your help I tried but still get the same error, I installed everything on the system, but unfortunately, the same error appears all the time and I think the problem is from my end.
You are welcome. Interestingly who is would only show up once I installed it via PIP not via anaconda although it was listed via “conda list”.
Maybe you check your KNIME and python setup once more. In general KNIME does work with newer python versions but I think there always is a recommended one,
I did all the configuration for python on knime platform, the only thing that couldn’t configure is “Tensorflow2” which gives error all the time. I installed it on my system but I don’t know why Knime keeps giving error that is not installed on the system. Can you please check your system to see if tensorflow installed on you system, if yes so i will go and fix that one if not i will check other configuration on my system.
Safest course of action is to use anaconda/miniconda and then have KNIME create the python environments. You can create one for general use and a separate environment for deeplearning (actually you can create 2 envs for deeplearning, one for keras (I presume TF1 based) and one for TF2).
To use a package then simply install the package into the appropriate environment, for the scripting node that would obviously be the “general use” environment.
Official supported python version I think is still only 3.6 but 3.7 works too. Haven’t tried 3.8 or 3.9.
Thank you very much for all your replies. After 4 days of working on this, I could finally manage to find out where was the problem. @mlauber71’s workflow didn’t work on my system. I checked everything and finally find out the installation of “whois” is only working on Linux and Mac OS, but not in windows OS.
If you want to run this module on Windows, you have to install “python-whois” in your working environment. Now my problem is solved but still couldn’t manage to read values directly from the table.
I have a table with a couple of URLs and already connected it to the python script (1=>1) node. please find the workflow in the attachment. Do you have any clue how can I twist python script to read my values through the table directly and check the URLs for their creation and expiration date and store all the result in a new table?
Thank you for coming back to me so quickly. What syntax I can use to twist the python script (1:1) node start to read values from my table? I will appreciate if you could give me an example workflow for a loop as I am new in Knime and didn’t use a loop over before.
Thank you very much for the workflow. I tried this and works perfectly if I write the domain name inside my code but when I want the script reads all URLs from my table it couldn’t manage to read it. I send a screenshot of my code. could you please check my code where I am wrong that the python script node does not read URLs from my table?
Now it looks ok. it seems to read all the rows from the URL table and create the result table, but I don’t why it give a null result. it seems for some reason it doesn’t check the whois in line 9 of my code.