An exception occurred while running Phython kernel

I’m testing your SARIMA Temperature Forecasting excample downloaded by KNIME hub and I meet an error with SARIMA predictor:

ERROR Python Script (Labs) 5:3:0:376 Execution failed in Try-Catch block: An exception occured while running the Python kernel.

I’ll try to create a new Phython environment but it doesn’t work.

My conda version is 4.14.0; Phython version 3.9.15.

@Guglielmo you might want to check this entry:

If this does not help it might be that there is a problem running this component on Windows. In any case. In order to help you might in the future provide some more details about your problem (How to write a good post).

2 Likes

Hello and many thanks for your support.
KNIME Phython Integration (labs) extension is correctly installed.
Error happen in SARIMA Predictor component:

Inside this component the errors happen on Phython Script (Labs) nodes:

image

ERROR Message inside both scripts.

An exception was raised by the Python Proxy. Return Message: Traceback (most recent call last):
  File "C:\Users\xxxxxxx\Miniconda3\envs\py3_knime_1\lib\site-packages\py4j\clientserver.py", line 581, in _call_proxy
    return_value = getattr(self.pool[obj_id], method)(*params)
  File "C:\Program Files\KNIME\plugins\org.knime.python3.scripting_4.6.1.v202207221015\src\main\python\knime_kernel.py", line 183, in setInputObject
    obj = pickle.load(file)
  File "statsmodels\tsa\statespace\_representation.pyx", line 1323, in statsmodels.tsa.statespace._representation.dStatespace.__setstate__
KeyError: 'initialized_diffuse'

I haven’t the Error Log to report (I don’t know why!!).

Regards

Could you try to run this workflow with an updated SARIMA learner:

It would be good if you could point to the concrete workflow you are using since there seem to be a lot of components out there. From the screenshot it seems to use your Python environment while the new one uses the bundled one.

You could extract a logfile in debug mode:

I’m not so expert by the way, I make the last updating of all extensions just today and in addition components like SARIMA learner/predictor look for exisisting updating every time that you open the workflow and KNIME asks for updating. So I think that the workflow are working with the last updating of SARIMA components.

Concerning Python environment see the installed extensions:

The workflow is an example available on the KNIME Hub:
SARIMA Forecast Example.knwf (2.2 MB)

This is a part of knime Log after debugging procedure, I don’t know if it is helpful (the whole log is a very big file!).

2022-11-28 00:05:30,492 : DEBUG : KNIME-Worker-36-Python Script (Labs) 5:3:0:375 :  : WorkflowManager : Python Script (Labs) : 5:3:0:375 : Python Script (Labs) 5:3:0:375 doBeforePostExecution
2022-11-28 00:05:30,492 : DEBUG : KNIME-Worker-36-Python Script (Labs) 5:3:0:375 :  : NodeContainer : Python Script (Labs) : 5:3:0:375 : Python Script (Labs) 5:3:0:375 has new state: POSTEXECUTE
2022-11-28 00:05:30,492 : DEBUG : KNIME-Worker-36-Python Script (Labs) 5:3:0:375 :  : WorkflowManager : Python Script (Labs) : 5:3:0:375 : Python Script (Labs) 5:3:0:375 doAfterExecute - failure
2022-11-28 00:05:30,492 : DEBUG : KNIME-Worker-36-Python Script (Labs) 5:3:0:375 :  : NodeContainer : Python Script (Labs) : 5:3:0:375 : Component Output 5:3:0:348 has new state: IDLE
2022-11-28 00:05:30,492 : DEBUG : KNIME-Worker-36-Python Script (Labs) 5:3:0:375 :  : Node : Python Script (Labs) : 5:3:0:375 : reset
2022-11-28 00:05:30,492 : DEBUG : KNIME-Worker-36-Python Script (Labs) 5:3:0:375 :  : Node : Python Script (Labs) : 5:3:0:375 : clean output ports.
2022-11-28 00:05:30,492 : DEBUG : KNIME-Worker-36-Python Script (Labs) 5:3:0:375 :  : WorkflowDataRepository : Python Script (Labs) : 5:3:0:375 : Removing handler 40dfae75-fe7d-41b0-929a-f2a36601dff1 (Python Script (Labs) 5:3:0:375: <no directory>) - 1 remaining
2022-11-28 00:05:30,492 : DEBUG : KNIME-Worker-36-Python Script (Labs) 5:3:0:375 :  : NodeContainer : Python Script (Labs) : 5:3:0:375 : Python Script (Labs) 5:3:0:375 has new state: IDLE
2022-11-28 00:05:30,492 : DEBUG : KNIME-Worker-36-Python Script (Labs) 5:3:0:375 :  : Node : Python Script (Labs) : 5:3:0:375 : Configure succeeded. (Python Script (Labs))
2022-11-28 00:05:30,492 : DEBUG : KNIME-Worker-36-Python Script (Labs) 5:3:0:375 :  : NodeContainer : Python Script (Labs) : 5:3:0:375 : Python Script (Labs) 5:3:0:375 has new state: CONFIGURED
2022-11-28 00:05:30,493 : DEBUG : KNIME-Worker-36-Python Script (Labs) 5:3:0:375 :  : NodeContainer : Python Script (Labs) : 5:3:0:375 : SARIMA Predictor 5:3:0 has new state: IDLE
2022-11-28 00:05:30,493 : DEBUG : KNIME-Worker-35-SARIMA Predictor 5:3 :  : WorkflowManager : SARIMA Predictor : 5:3 : SARIMA Predictor 5:3 doBeforePostExecution
2022-11-28 00:05:30,493 : DEBUG : KNIME-Worker-35-SARIMA Predictor 5:3 :  : NodeContainer : SARIMA Predictor : 5:3 : SARIMA Predictor 5:3 has new state: POSTEXECUTE
2022-11-28 00:05:30,493 : DEBUG : KNIME-Worker-35-SARIMA Predictor 5:3 :  : WorkflowManager : SARIMA Predictor : 5:3 : SARIMA Predictor 5:3 doAfterExecute - failure
2022-11-28 00:05:30,493 : DEBUG : KNIME-Worker-35-SARIMA Predictor 5:3 :  : NodeContainer : SARIMA Predictor : 5:3 : Visualize Forecast 5:28 has new state: IDLE
2022-11-28 00:05:30,493 : DEBUG : KNIME-Worker-35-SARIMA Predictor 5:3 :  : NodeContainer : SARIMA Predictor : 5:3 : SARIMA Predictor 5:3 has new state: IDLE
2022-11-28 00:05:30,493 : DEBUG : KNIME-Worker-35-SARIMA Predictor 5:3 :  : Node : Python Script (Labs) : 5:3:0:375 : Configure succeeded. (Python Script (Labs))
2022-11-28 00:05:30,493 : DEBUG : KNIME-Worker-35-SARIMA Predictor 5:3 :  : NodeContainer : SARIMA Predictor : 5:3 : SARIMA Forecast Example 5 has new state: IDLE
2022-11-28 00:14:00,694 : DEBUG : main :  : WorkflowEditPartFactory :  :  : Deactivate org.knime.workbench.editor.context
2022-11-28 00:14:00,694 : DEBUG : main :  : WorkflowEditPartFactory :  :  : Deactivate org.knime.workbench.editor.context
2022-11-28 00:14:00,694 : DEBUG : main :  : WorkflowEditPartFactory :  :  : Deactivate org.knime.workbench.editor.context
2022-11-28 00:14:00,694 : DEBUG : main :  : WorkflowEditPartFactory :  :  : Deactivate org.knime.workbench.editor.context

@Guglielmo could you check again if you could run the “Time Series Components Updated!” workflow?

Then you could check again which of the components (Components: SARIMA Predictor – KNIME Community Hub) you actually use, can you try reloading it from the above mentioned workflow or copy it.

Also you might want to check this:

1 Like

Hi @mlauber71 Time Series Components Updated! – KNIME Hub run without errors (I tested SARIMA branch as I’m late and my PC work very very slowly)! SARIMA Predictor work properly.

Copying and pasting both SARIMA components (Learner and Predictor) in the SARIMA Temperature Forecasting Example the workflow now run correctly, but if I past only SARIMA Predictor it doesn’t work. So maybe both components are differents from the components used in the Time Series Component Updated.

How can I check the version of the component in use?
How do I save the new components in place of the ones listed in EXAMPLE\00Component\Time Series?

Many thanks for the help!

1 Like

@Guglielmo with a right click on the component you could update it.

It would seem these are the latest ones.

But you can also was copy and paste and then update the ones which are working.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.