I’m trying to connect KNIME with the Google Search Console. I use this script in Python Script node:
import pandas as pd
file = searchconsole.authenticate(client_config=‘…json’)
account = searchconsole.authenticate(client_config=file)
output_table_1 = pd.DataFrame([p.raw for p in account.webproperties])
output_object_1 = pickle.dumps(account)
But I get an error: ModuleNotFoundError: No module named ‘searchconsole’
If I execute this script in Jupyter Notebook ist works:
account = searchconsole.authenticate(client_config=‘…json’)
Python integration in KNIME is installed.
What do I wrong?
it looks like searchconsole is not installed in the Python environment you are using in your Python Script node. You could check which Python environment you are using via Preferences → KNIME → Python. On that Python environment , you can install the missing module. Does this help? Don’t hesitate to ask further questions!
thanks for your response. But how do I install the module on the Python enviroment I’m using in KNIME?
I already tried pip install searchconsole.
just that we are on the same page:
- You found out on the preference page, which Python environment you use, correct?
- You activated the environment on your console via
conda activate <your Python environment>?
- You installed searchconsole via
pip install searchconsole within the activated environment?
- You checked that it is installed via
conda list and you see it
- You restarted KNIME
Did you perform these steps, did all of them work and is the Python Script throwing the same error? Don’t hesitate to ask further questions!
thank you very much for the detailed instruction!
I missed step 2: “You activated the environment on your console via
conda activate <your Python environment>?”
Now it works!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.