What is the issue this is the error i found while i am running streamlit

ValueError: 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’)]

Traceback:

File "C:\Users\Sahana K S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 535, in _run_script
    exec(code, module.__dict__)File "C:\Users\Sahana K S\Desktop\manasa\main.py", line 8, in <module>
    pipe = pickle.load(open('pipe.pkl', 'rb'))File "sklearn\\tree\\_tree.pyx", line 865, in sklearn.tree._tree.Tree.__setstate__File "sklearn\\tree\\_tree.pyx", line 1571, in sklearn.tree._tree._check_node_ndarray
```If you're creating a **debugging post**, please include the following info:
1 App is running locally 
requirements
streamlit==1.23.1
scikit-learn==1.4.0
pandas==2.2.0
numpy==1.26.4
pickle-mixin==1.0.2
pickleshare==0.7.5
xgboost==2.0.3

Take a look at this similar post:

1 Like