kyleskom / NBA-Machine-Learning-Sports-Betting

NBA sports betting using machine learning
1.23k stars 443 forks source link

python version 6.11.6 OSError: Cannot parse keras metadata at path Models/NN_Models/Trained-Model-ML-1699315388.285516\keras_metadata.pb: Received error: Error parsing message #371

Closed Maska-coder closed 11 months ago

Maska-coder commented 12 months ago

Followed all the of the build instructions. Using windows 10, used pyenv to install python 3.11.6, also tried other python versions like 3.11.0 and 3.10.0 still same error.

full error:

PS C:\Users\oompa\Desktop\NBA-Machine-Learning-Sports-Betting> python3 main.py -xgb -odds=fanduel
Traceback (most recent call last):
  File "C:\Users\oompa\Desktop\NBA-Machine-Learning-Sports-Betting\main.py", line 9, in <module>
    from src.Predict import NN_Runner, XGBoost_Runner
  File "C:\Users\oompa\Desktop\NBA-Machine-Learning-Sports-Betting\src\Predict\NN_Runner.py", line 12, in <module>
    model = load_model('Models/NN_Models/Trained-Model-ML-1699315388.285516')
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\oompa\.pyenv\pyenv-win\versions\3.11.6\Lib\site-packages\keras\src\saving\saving_api.py", line 262, in load_model
    return legacy_sm_saving_lib.load_model(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\oompa\.pyenv\pyenv-win\versions\3.11.6\Lib\site-packages\keras\src\utils\traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "C:\Users\oompa\.pyenv\pyenv-win\versions\3.11.6\Lib\site-packages\keras\src\saving\legacy\saved_model\load.py", line 113, in load
    raise IOError(
OSError: Cannot parse keras metadata at path Models/NN_Models/Trained-Model-ML-1699315388.285516\keras_metadata.pb: Received error: Error parsing message
PS C:\Users\oompa\Desktop\NBA-Machine-Learning-Sports-Betting> python --version
Python 3.11.6
kyleskom commented 11 months ago

Try https://github.com/kyleskom/NBA-Machine-Learning-Sports-Betting/issues/344#issuecomment-1821809331