# KeyError 118

**URL:** <https://discuss.streamlit.io/t/keyerror-118/7922>\
**Category:** Using Streamlit\
**Created:** [December 11, 2020, 2:02am UTC](https://discuss.streamlit.io/t/keyerror-118/7922 "2020-12-11T02:02:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![akhan390](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/akhan390/32/4531_2.png) [@akhan390](https://discuss.streamlit.io/u/akhan390)\
**Post date:** [December 11, 2020, 2:02am UTC](https://discuss.streamlit.io/t/keyerror-118/7922/1 "2020-12-11T02:02:30Z")

</div>

Hi,  
I am trying to deploy my app and receive KeyError 118. I used a joblib file to pickle my model and that seems to be the issue, but I’m not sure why.

---

<div class="post-metadata">

**Author:** ![Marisa\_Smith](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/marisa_smith/32/11154_2.png) [@Marisa\_Smith](https://discuss.streamlit.io/u/Marisa_Smith)\
**Post date:** [December 11, 2020, 4:19pm UTC](https://discuss.streamlit.io/t/keyerror-118/7922/2 "2020-12-11T16:19:50Z")

</div>

Hey @akhan390,

Are you deploying your app on Streamlit Sharing (if not where are you deploying it)? Can you put your github link and a screen shot of the error longs your getting when you try and deploy?

Thanks!  
Marisa

---

<div class="post-metadata">

**Author:** ![wandabwa2004](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/wandabwa2004/32/4331_2.png) [@wandabwa2004](https://discuss.streamlit.io/u/wandabwa2004)\
**Post date:** [January 17, 2021, 11:34pm UTC](https://discuss.streamlit.io/t/keyerror-118/7922/3 "2021-01-17T23:34:05Z")

</div>

I have the same issue @Marisa_Smith .

Error is as above **KeyError: 118**

```
Traceback:
File "/usr/local/lib/python3.7/site-packages/streamlit/script_runner.py", line 332, in _run_script
    exec(code, module. __dict__ )
File "/app/ontimeperformance/app.py", line 43, in <module>
    model = load_model('Randomforestmodel')
File "/home/appuser/.local/lib/python3.7/site-packages/pycaret/classification.py", line 2149, in load_model
    verbose=verbose,
File "/home/appuser/.local/lib/python3.7/site-packages/pycaret/internal/tabular.py", line 8966, in load_model
    model_name, platform, authentication, verbose
File "/home/appuser/.local/lib/python3.7/site-packages/pycaret/internal/persistence.py", line 373, in load_model
    return joblib.load(model_name)
File "/home/appuser/.local/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 585, in load
    obj = _unpickle(fobj, filename, mmap_mode)
File "/home/appuser/.local/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 504, in _unpickle
    obj = unpickler.load()
File "/usr/local/lib/python3.7/pickle.py", line 1088, in load
    dispatch[key[0]](self)

```

GitHub link to the app and model ([GitHub - wandabwa2004/OntimePerformance: Ontime Trains Performance model](https://github.com/wandabwa2004/OntimePerformance))

I’m not sure of what I’m doing wrong. A few things :-

1. The model is about 200MB and I uploaded via Git-LFS. I did a Git Pull just to check whether the model format changed but seems be the same.
2. A smaller model i.e. 19MB works but it lacks many features compared to the updated model.

Is size the issue? I don’t think I’ve utilized the entire 800MB that’s allowed.

---

<div class="post-metadata">

**Author:** ![Marisa\_Smith](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/marisa_smith/32/11154_2.png) [@Marisa\_Smith](https://discuss.streamlit.io/u/Marisa_Smith)\
**Post date:** [January 19, 2021, 2:44pm UTC](https://discuss.streamlit.io/t/keyerror-118/7922/4 "2021-01-19T14:44:46Z")

</div>

Hey @wandabwa2004,

I think I know what the issue is here, right now Streamlit Sharing doesn’t support the git-lfs.

Check out this forum post for more details:

> [@Help with "UnpicklingError: invalid load key, 'v'."](https://discuss.streamlit.io/t/help-with-unpicklingerror-invalid-load-key-v/8592):
>
> Hi and happy new year, May I ask for your help with the following upickling error on my Streamlit App: These pickle files were uploaded to github using git-lfs, as they are large files–might that be involved in the error? My python version is 3.7.4 My streamlit version is 0.72.0 My github repo is [GitHub - amaze2/concordiensis: Concordiensis Project](https://github.com/amaze2/concordiensis) I would really appreciate your help with this. Thank you in advance!

Cheers,  
Marisa

---

<div class="post-metadata">

**Author:** ![wandabwa2004](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/wandabwa2004/32/4331_2.png) [@wandabwa2004](https://discuss.streamlit.io/u/wandabwa2004)\
**Post date:** [January 19, 2021, 7:33pm UTC](https://discuss.streamlit.io/t/keyerror-118/7922/5 "2021-01-19T19:33:07Z")

</div>

Thank you @Marisa_Smith. I’ll look at other ways of making the model accessible as I await Streamlit updates on this.

---

<div class="post-metadata">

**Author:** ![randyzwitch](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/randyzwitch/32/58772_2.png) [@randyzwitch](https://discuss.streamlit.io/u/randyzwitch)\
**Post date:** [February 13, 2021, 2:14am UTC](https://discuss.streamlit.io/t/keyerror-118/7922/6 "2021-02-13T02:14:39Z")

</div>

Git LFS should have gone out in the Streamlit sharing release this evening, please try it out and let us know if you have any issues.

Best,  
Randy

---

<div class="post-metadata">

**Author:** ![randyzwitch](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/randyzwitch/32/58772_2.png) [@randyzwitch](https://discuss.streamlit.io/u/randyzwitch)\
**Post date:** [May 13, 2022, 8:43pm UTC](https://discuss.streamlit.io/t/keyerror-118/7922/7 "2022-05-13T20:43:24Z")

</div>


