SARIMA Components contain Python errors

It looks like the SARIMA Learner and SARIMA Predictor components were updated in October to go along with the new Python integration. However when you run them out of the box, this error occurs:

Execute failed: ImportError: cannot import name ‘datetime’ from ‘pandas’

It’s easy to fix if you are familiar with Python. I opened the component, opened the dialog for the Python Script ‘SARIMA Learner’ node, and changed this line:

from pandas import datetime

to this:

import datetime

I repeated the process for the SARIMA Predictor component with the Python Script ‘forecast’ node, and now they both run successfully.

This error was already mentioned in this post along with some other user issues, but the components have not been updated since. I wanted to flag the bug and post the solution as well for anyone else running into this error.

Thanks @cbirch for the details. I’ll pass this on internally and see if we can’t get those components fixed.

It was just pointed out to me that you might want to give the nodes in the Time Series Python Extension extension a shot :slight_smile:


Hi guys, is there a way to solve this problem without any Python knowledge. I downloaded the Extension and have Python on bundled. But still have problem with that Error with the ARIMA Nodes.

"ERROR Python Script 3:182:0:368 Execute failed: ImportError: cannot import name ‘datetime’ from ‘pandas’ "

Tanks for your help!

Hi @achagnaud and welcome to the forum.

Just to be clear, did you try the new Python nodes I linked above, or are you still using the verified components?

In either case, are you able to upload a workflow with some sample data that reproduces the problem?


Hi Scott,
I have this problem with the regular ARIMA model Leander Node. With the SARIMA it worked without this Error. I just wanted to use the standard Arima Model after the decomposed signal. But if also standard to use the SARIMA I will do so - even though my Signal is Not having a big seasonal effect.

Is it correct that I do not have to but can decompose the Signal anyways before using the SARIMA model? Would be happy to see a video or finding more infos on the SARIMA node - the book of yours is on its way already. But any tutorial would be great!

Thanks for your help and have a great Week.


Hi Scott,
I have tried to use the Workflow on Knime with the updated components and have the same Errors for the SARIMA Learner / Auto-SARIMA / neu Arima Learner.