Error in loading the streamlit app

Error occurred during prediction: node array from the pickle has an incompatible dtype:

  • expected: {‘names’: [‘left_child’, ‘right_child’, ‘feature’, ‘threshold’, ‘impurity’, ‘n_node_samples’, ‘weighted_n_node_samples’, ‘missing_go_to_left’], ‘formats’: [‘<i8’, ‘<i8’, ‘<i8’, ‘<f8’, ‘<f8’, ‘<i8’, ‘<f8’, ‘u1’], ‘offsets’: [0, 8, 16, 24, 32, 40, 48, 56], ‘itemsize’: 64}
  • got : [(‘left_child’, ‘<i8’), (‘right_child’, ‘<i8’), (‘feature’, ‘<i8’), (‘threshold’, ‘<f8’), (‘impurity’, ‘<f8’), (‘n_node_samples’, ‘<i8’), (‘weighted_n_node_samples’, ‘<f8’)]

The app is running into this issue while trying to load a pickle model, and i tried to downstream the version of streamlit to 1.2.2 and it show error saying,‘ERROR: No matching distribution found for streamlit==1.2.2’ ,
how to solve this

Hi @Suthishma_Babu,

Thanks for sharing this question!

So for Streamlit, we don’t have version 1.2.2 and that would be an older version. I suggest using one the more latest versions like 1.33.0 or 1.32.0.

For the pickle file error, ensure that the version of the library used to train and pickle the model is the same as the one used to load the model.

I used the 1.33.0 version but it didn’t worked and shows the same error message,can you help me to solve the error? if you so i will share all the code i used for model training and developing the streamlit app

Can you share your code to help us troubleshoot the issue for you?

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