Sebastian Dengler
Sebastian Dengler

Reputation: 1308

tsfresh extract_features runtime error "freeze_support"

I recently installed the tsfresh package to extract features of my timeseries data. I tried to run the example in the documentation and got the following error:

RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.

I'm a bit confused since it's literally the example code:

from tsfresh.examples import load_robot_execution_failures
from tsfresh import extract_features

df, _ = load_robot_execution_failures()
X = extract_features(df, column_id='id', column_sort='time')

I get the same error when i try the function with my own data. What am i doing wrong?

Upvotes: 2

Views: 1326

Answers (1)

Mary
Mary

Reputation: 39

I think there is a solution to the problem. You can try to add if __name__ == "__main__:" around function callings.

Upvotes: 3

Related Questions