Getting key error 118

File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)File "/app/project2023/part5.py", line 6, in <module>
    model = joblib.load("final_model.pkl")File "/home/appuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 658, in load
    obj = _unpickle(fobj, filename, mmap_mode)File "/home/appuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 577, in _unpickle
    obj = unpickler.load()File "/usr/local/lib/python3.9/pickle.py", line 1212, in load
    dispatch[key[0]](self)

im getting this error
i used git lfs to push a large pkl file

Hey @K_Sanjana,

Can you share the full error message as well as a code snippet so we can try to reproduce the error?

[16:17:42] ๐Ÿ Python dependencies were installed from /app/project2023/requirements.txt using pip.
Check if streamlit is installed
Streamlit is already installed
[16:17:43] ๐Ÿ“ฆ Processed dependencies!

Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.




2023-03-23 16:18:02.007 Uncaught app exception
Traceback (most recent call last):
  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)
  File "/app/project2023/part5.py", line 6, in <module>
    model = joblib.load("final_model.pkl")
  File "/home/appuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 658, in load
    obj = _unpickle(fobj, filename, mmap_mode)
  File "/home/appuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 577, in _unpickle
    obj = unpickler.load()
  File "/usr/local/lib/python3.9/pickle.py", line 1212, in load
    dispatch[key[0]](self)
KeyError: 118
2023-03-26 08:59:28.864 Uncaught app exception
Traceback (most recent call last):
  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)
  File "/app/project2023/part5.py", line 6, in <module>
    model = joblib.load("final_model.pkl")
  File "/home/appuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 658, in load
    obj = _unpickle(fobj, filename, mmap_mode)
  File "/home/appuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 577, in _unpickle
    obj = unpickler.load()
  File "/usr/local/lib/python3.9/pickle.py", line 1212, in load
    dispatch[key[0]](self)
KeyError: 118
2023-03-26 08:59:32.431 Uncaught app exception
Traceback (most recent call last):
  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)
  File "/app/project2023/part5.py", line 6, in <module>
    model = joblib.load("final_model.pkl")
  File "/home/appuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 658, in load
    obj = _unpickle(fobj, filename, mmap_mode)
  File "/home/appuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 577, in _unpickle
    obj = unpickler.load()
  File "/usr/local/lib/python3.9/pickle.py", line 1212, in load
    dispatch[key[0]](self)
KeyError: 118
2023-03-27 03:08:04.100 Uncaught app exception
Traceback (most recent call last):
  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)
  File "/app/project2023/part5.py", line 6, in <module>
    model = joblib.load("final_model.pkl")
  File "/home/appuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 658, in load
    obj = _unpickle(fobj, filename, mmap_mode)
  File "/home/appuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 577, in _unpickle
    obj = unpickler.load()
  File "/usr/local/lib/python3.9/pickle.py", line 1212, in load
    dispatch[key[0]](self)
KeyError: 118

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