XGBoostError - Invalid cast, from Null to Array

Hello,
I have built an ML model with XGboost, and I save my file as:

model.save_model( ‘default_class_model.json’)

Then, I upload the model as:

model_xgb_2 = xgb.Booster()
model_xgb_2.load_model( ‘default_class_model.json’)

However, I am launching this code on Streamlit and I get the following error:

XGBoostError: [13:38:10] C:\Users\Administrator\workspace\xgboost-win64_release_1.1.0\include\xgboost/json.h:65: Invalid cast, from Null to Array

Anny idea why?

Make sure to use the identical version of XGBoost when saving and loading the model on two different machines.

You were right! I was deploying with an old version of xgboost. Thank you!

Quick note, it’s supported to load older model (backward compatibility), but not newer model (not forward compatible)