Unpickling error: Invalid load key

Hello Streamlit fam,

Sorry to continue to spam the board with question after question, but I now am getting a invalid load key when I try to deploy the app from Github. Could anyone take a look and let me know what you think?

Repo: Here

[client] Provisioning machine...
[client] Preparing system...
[client] Spinning up manager process...
[client] Connecting...
[manager] Starting up for owner: 'krndxs', repository: 'healthcare-prediction', branch: 'main', main module: 'model_integration.py'
[manager] Cloning repository ...
[manager] Cloning into 'healthcare-prediction'...
[manager] Cloned repository!
[manager] Processing dependencies ...
Collecting numpy==1.19.2
  Downloading numpy-1.19.2-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB)
Collecting plotly==5.1.0
  Downloading plotly-5.1.0-py2.py3-none-any.whl (20.6 MB)
Collecting streamlit==0.86.0
  Downloading streamlit-0.86.0-py2.py3-none-any.whl (8.0 MB)
Collecting geopy==2.2.0
  Downloading geopy-2.2.0-py3-none-any.whl (118 kB)
Collecting pandas==1.1.5
  Downloading pandas-1.1.5-cp38-cp38-manylinux1_x86_64.whl (9.3 MB)
Collecting geocoder==1.38.1
  Downloading geocoder-1.38.1-py2.py3-none-any.whl (98 kB)
Collecting scikit_learn==0.24.2
  Downloading scikit_learn-0.24.2-cp38-cp38-manylinux2010_x86_64.whl (24.9 MB)
Collecting pyarrow==5.0.0
  Downloading pyarrow-5.0.0-cp38-cp38-manylinux2014_x86_64.whl (23.6 MB)
Collecting pickle5==0.0.11
  Downloading pickle5-0.0.11.tar.gz (132 kB)
Collecting six
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting tenacity>=6.2.0
  Downloading tenacity-8.0.1-py3-none-any.whl (24 kB)
Collecting astor
  Downloading astor-0.8.1-py2.py3-none-any.whl (27 kB)
Collecting requests
  Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting toml
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting cachetools>=4.0
  Downloading cachetools-4.2.2-py3-none-any.whl (11 kB)
Collecting packaging
  Downloading packaging-21.0-py3-none-any.whl (40 kB)
Collecting gitpython!=3.1.19
  Downloading GitPython-3.1.18-py3-none-any.whl (170 kB)
Collecting attrs
  Downloading attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting base58
  Downloading base58-2.1.0-py3-none-any.whl (5.6 kB)
Collecting tornado>=5.0
  Downloading tornado-6.1-cp38-cp38-manylinux2010_x86_64.whl (427 kB)
Collecting pydeck>=0.1.dev5
  Downloading pydeck-0.6.2-py2.py3-none-any.whl (4.2 MB)
Collecting tzlocal
  Downloading tzlocal-3.0-py3-none-any.whl (16 kB)
Collecting validators
  Downloading validators-0.18.2-py3-none-any.whl (19 kB)
Collecting click<8.0,>=7.0
  Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting altair>=3.2.0
  Downloading altair-4.1.0-py3-none-any.whl (727 kB)
Collecting watchdog
  Downloading watchdog-2.1.3-py3-none-manylinux2014_x86_64.whl (75 kB)
Collecting protobuf!=3.11,>=3.6.0
  Downloading protobuf-3.17.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB)
Collecting pillow>=6.2.0
  Downloading Pillow-8.3.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.0 MB)
Collecting blinker
  Downloading blinker-1.4.tar.gz (111 kB)
Collecting python-dateutil
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting geographiclib<2,>=1.49
  Downloading geographiclib-1.52-py3-none-any.whl (38 kB)
Collecting pytz>=2017.2
  Downloading pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting ratelim
  Downloading ratelim-0.1.6-py2.py3-none-any.whl (4.0 kB)
Collecting future
  Downloading future-0.18.2.tar.gz (829 kB)
Collecting threadpoolctl>=2.0.0
  Downloading threadpoolctl-2.2.0-py3-none-any.whl (12 kB)
Collecting joblib>=0.11
  Downloading joblib-1.0.1-py3-none-any.whl (303 kB)
Collecting scipy>=0.19.1
  Downloading scipy-1.7.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (28.4 MB)
Collecting jsonschema
  Downloading jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Collecting jinja2
  Downloading Jinja2-3.0.1-py3-none-any.whl (133 kB)
Collecting entrypoints
  Downloading entrypoints-0.3-py2.py3-none-any.whl (11 kB)
Collecting toolz
  Downloading toolz-0.11.1-py3-none-any.whl (55 kB)
Collecting gitdb<5,>=4.0.1
  Downloading gitdb-4.0.7-py3-none-any.whl (63 kB)
Collecting smmap<5,>=3.0.1
  Downloading smmap-4.0.0-py2.py3-none-any.whl (24 kB)
Collecting ipywidgets>=7.0.0
  Downloading ipywidgets-7.6.3-py2.py3-none-any.whl (121 kB)
Collecting ipykernel>=5.1.2
  Downloading ipykernel-6.2.0-py3-none-any.whl (122 kB)
Collecting traitlets>=4.3.2
  Downloading traitlets-5.0.5-py3-none-any.whl (100 kB)
Collecting debugpy<2.0,>=1.0.0
  Downloading debugpy-1.4.1-cp38-cp38-manylinux2014_x86_64.whl (4.5 MB)
Collecting ipython<8.0,>=7.23.1
  Downloading ipython-7.26.0-py3-none-any.whl (786 kB)
Collecting matplotlib-inline<0.2.0,>=0.1.0
  Downloading matplotlib_inline-0.1.2-py3-none-any.whl (8.2 kB)
Collecting jupyter-client<8.0
  Downloading jupyter_client-6.1.12-py3-none-any.whl (112 kB)
Collecting pexpect>4.3
  Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
Collecting setuptools>=18.5
  Downloading setuptools-57.4.0-py3-none-any.whl (819 kB)
Collecting pygments
  Downloading Pygments-2.10.0-py3-none-any.whl (1.0 MB)
Collecting decorator
  Downloading decorator-5.0.9-py3-none-any.whl (8.9 kB)
Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0
  Downloading prompt_toolkit-3.0.19-py3-none-any.whl (368 kB)
Collecting pickleshare
  Downloading pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting jedi>=0.16
  Downloading jedi-0.18.0-py2.py3-none-any.whl (1.4 MB)
Collecting backcall
  Downloading backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting widgetsnbextension~=3.5.0
  Downloading widgetsnbextension-3.5.1-py2.py3-none-any.whl (2.2 MB)
Collecting nbformat>=4.2.0
  Downloading nbformat-5.1.3-py3-none-any.whl (178 kB)
Collecting jupyterlab-widgets>=1.0.0
  Downloading jupyterlab_widgets-1.0.0-py3-none-any.whl (243 kB)
Collecting parso<0.9.0,>=0.8.0
  Downloading parso-0.8.2-py2.py3-none-any.whl (94 kB)
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (30 kB)
Collecting pyzmq>=13
  Downloading pyzmq-22.2.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)
Collecting jupyter-core>=4.6.0
  Downloading jupyter_core-4.7.1-py3-none-any.whl (82 kB)
Collecting ipython-genutils
  Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting pyrsistent>=0.14.0
  Downloading pyrsistent-0.18.0-cp38-cp38-manylinux1_x86_64.whl (118 kB)
Collecting ptyprocess>=0.5
  Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting wcwidth
  Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting notebook>=4.4.1
  Downloading notebook-6.4.3-py3-none-any.whl (9.9 MB)
Collecting nbconvert
  Downloading nbconvert-6.1.0-py3-none-any.whl (551 kB)
Collecting prometheus-client
  Downloading prometheus_client-0.11.0-py2.py3-none-any.whl (56 kB)
Collecting terminado>=0.8.3
  Downloading terminado-0.11.1-py3-none-any.whl (15 kB)
Collecting Send2Trash>=1.5.0
  Downloading Send2Trash-1.8.0-py3-none-any.whl (18 kB)
Collecting argon2-cffi
  Downloading argon2_cffi-20.1.0-cp35-abi3-manylinux1_x86_64.whl (97 kB)
Collecting cffi>=1.0.0
  Downloading cffi-1.14.6-cp38-cp38-manylinux1_x86_64.whl (411 kB)
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
Collecting nbclient<0.6.0,>=0.5.0
  Downloading nbclient-0.5.4-py3-none-any.whl (66 kB)
Collecting mistune<2,>=0.8.1
  Downloading mistune-0.8.4-py2.py3-none-any.whl (16 kB)
Collecting bleach
  Downloading bleach-4.0.0-py2.py3-none-any.whl (146 kB)
Collecting pandocfilters>=1.4.1
  Downloading pandocfilters-1.4.3.tar.gz (16 kB)
Collecting testpath
  Downloading testpath-0.5.0-py3-none-any.whl (84 kB)
Collecting defusedxml
  Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting jupyterlab-pygments
  Downloading jupyterlab_pygments-0.1.2-py2.py3-none-any.whl (4.6 kB)
Collecting nest-asyncio
  Downloading nest_asyncio-1.5.1-py3-none-any.whl (5.0 kB)
Collecting webencodings
  Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting pyparsing>=2.0.2
  Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting idna<4,>=2.5
  Downloading idna-3.2-py3-none-any.whl (59 kB)
Collecting certifi>=2017.4.17
  Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
Collecting urllib3<1.27,>=1.21.1
  Downloading urllib3-1.26.6-py2.py3-none-any.whl (138 kB)
Collecting charset-normalizer~=2.0.0
  Downloading charset_normalizer-2.0.4-py3-none-any.whl (36 kB)
Collecting backports.zoneinfo
  Downloading backports.zoneinfo-0.2.1-cp38-cp38-manylinux1_x86_64.whl (74 kB)
Building wheels for collected packages: pickle5, blinker, future, pandocfilters
  Building wheel for pickle5 (setup.py): started
  Building wheel for pickle5 (setup.py): finished with status 'done'
  Created wheel for pickle5: filename=pickle5-0.0.11-cp38-cp38-linux_x86_64.whl size=123098 sha256=7252fb8f3b8f4c6072621838eb42ca68f91d552e9ba47d9996be34c0279bce4c
  Stored in directory: /tmp/pip-ephem-wheel-cache-8nlpzd2y/wheels/25/d4/61/dbd8edd1a0d656be7b4267c85db3b61951eb60016a0154a122
  Building wheel for blinker (setup.py): started
  Building wheel for blinker (setup.py): finished with status 'done'
  Created wheel for blinker: filename=blinker-1.4-py3-none-any.whl size=13479 sha256=a0f346710f2406ac786ddb59a16898d31be6c5017408a5a820a4bcd1a5595967
  Stored in directory: /tmp/pip-ephem-wheel-cache-8nlpzd2y/wheels/b7/a5/68/fe632054a5eadd531c7a49d740c50eb6adfbeca822b4eab8d4
  Building wheel for future (setup.py): started
  Building wheel for future (setup.py): finished with status 'done'
  Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491070 sha256=3280f347f652e509750a1f1a3bf8d42c5f6fe611a01b0e61c1d9b55754dfe6f1
  Stored in directory: /tmp/pip-ephem-wheel-cache-8nlpzd2y/wheels/8e/70/28/3d6ccd6e315f65f245da085482a2e1c7d14b90b30f239e2cf4
  Building wheel for pandocfilters (setup.py): started
  Building wheel for pandocfilters (setup.py): finished with status 'done'

Uninstalling certifi-2021.5.30:

  Successfully uninstalled certifi-2021.5.30

Attempting uninstall: watchdog


Found existing installation: watchdog 2.1.3

Uninstalling watchdog-2.1.3:

  Successfully uninstalled watchdog-2.1.3

Attempting uninstall: validators


Found existing installation: validators 0.18.2

Uninstalling validators-0.18.2:

  Successfully uninstalled validators-0.18.2

Attempting uninstall: tzlocal


Found existing installation: tzlocal 2.1

Uninstalling tzlocal-2.1:

  Successfully uninstalled tzlocal-2.1

Attempting uninstall: toml


Found existing installation: toml 0.10.2

Uninstalling toml-0.10.2:

  Successfully uninstalled toml-0.10.2

Attempting uninstall: requests


Found existing installation: requests 2.26.0

Uninstalling requests-2.26.0:

  Successfully uninstalled requests-2.26.0

Attempting uninstall: pydeck


Found existing installation: pydeck 0.6.2

Uninstalling pydeck-0.6.2:

  Successfully uninstalled pydeck-0.6.2

Attempting uninstall: pyarrow


Found existing installation: pyarrow 5.0.0

Uninstalling pyarrow-5.0.0:

  Successfully uninstalled pyarrow-5.0.0

Attempting uninstall: protobuf


Found existing installation: protobuf 3.17.3

Uninstalling protobuf-3.17.3:

  Successfully uninstalled protobuf-3.17.3

Attempting uninstall: pillow


Found existing installation: Pillow 8.3.1

Uninstalling Pillow-8.3.1:

  Successfully uninstalled Pillow-8.3.1

Attempting uninstall: gitpython


Found existing installation: GitPython 3.1.18

Uninstalling GitPython-3.1.18:

  Successfully uninstalled GitPython-3.1.18

Attempting uninstall: click


Found existing installation: click 7.1.2

Uninstalling click-7.1.2:

  Successfully uninstalled click-7.1.2

Attempting uninstall: cachetools


Found existing installation: cachetools 4.2.2

Uninstalling cachetools-4.2.2:

  Successfully uninstalled cachetools-4.2.2

Attempting uninstall: blinker


Found existing installation: blinker 1.4

Uninstalling blinker-1.4:

  Successfully uninstalled blinker-1.4

Attempting uninstall: base58


Found existing installation: base58 2.1.0

Uninstalling base58-2.1.0:

  Successfully uninstalled base58-2.1.0

Attempting uninstall: astor


Found existing installation: astor 0.8.1

Uninstalling astor-0.8.1:

  Successfully uninstalled astor-0.8.1

Attempting uninstall: altair


Found existing installation: altair 4.1.0

Uninstalling altair-4.1.0:

  Successfully uninstalled altair-4.1.0

Attempting uninstall: streamlit


Found existing installation: streamlit 0.85.1

Uninstalling streamlit-0.85.1:

  Successfully uninstalled streamlit-0.85.1

Successfully installed MarkupSafe-2.0.1 Send2Trash-1.8.0 altair-4.1.0 argon2-cffi-20.1.0 astor-0.8.1 attrs-21.2.0 backcall-0.2.0 backports.zoneinfo-0.2.1 base58-2.1.0 bleach-4.0.0 blinker-1.4 cachetools-4.2.2 certifi-2021.5.30 cffi-1.14.6 charset-normalizer-2.0.4 click-7.1.2 debugpy-1.4.1 decorator-5.0.9 defusedxml-0.7.1 entrypoints-0.3 future-0.18.2 geocoder-1.38.1 geographiclib-1.52 geopy-2.2.0 gitdb-4.0.7 gitpython-3.1.18 idna-3.2 ipykernel-6.2.0 ipython-7.26.0 ipython-genutils-0.2.0 ipywidgets-7.6.3 jedi-0.18.0 jinja2-3.0.1 joblib-1.0.1 jsonschema-3.2.0 jupyter-client-6.1.12 jupyter-core-4.7.1 jupyterlab-pygments-0.1.2 jupyterlab-widgets-1.0.0 matplotlib-inline-0.1.2 mistune-0.8.4 nbclient-0.5.4 nbconvert-6.1.0 nbformat-5.1.3 nest-asyncio-1.5.1 notebook-6.4.3 numpy-1.19.2 packaging-21.0 pandas-1.1.5 pandocfilters-1.4.3 parso-0.8.2 pexpect-4.8.0 pickle5-0.0.11 pickleshare-0.7.5 pillow-8.3.1 plotly-5.1.0 prometheus-client-0.11.0 prompt-toolkit-3.0.19 protobuf-3.17.3 ptyprocess-0.7.0 pyarrow-5.0.0 pycparser-2.20 pydeck-0.6.2 pygments-2.10.0 pyparsing-2.4.7 pyrsistent-0.18.0 python-dateutil-2.8.2 pytz-2021.1 pyzmq-22.2.1 ratelim-0.1.6 requests-2.26.0 scikit-learn-0.24.2 scipy-1.7.1 setuptools-57.4.0 six-1.16.0 smmap-4.0.0 streamlit-0.86.0 tenacity-8.0.1 terminado-0.11.1 testpath-0.5.0 threadpoolctl-2.2.0 toml-0.10.2 toolz-0.11.1 tornado-6.1 traitlets-5.0.5 tzlocal-3.0 urllib3-1.26.6 validators-0.18.2 watchdog-2.1.3 wcwidth-0.2.5 webencodings-0.5.1 widgetsnbextension-3.5.1


WARNING: You are using pip version 21.1.1; however, version 21.2.4 is available.


You should consider upgrading via the ‘/home/appuser/venv/bin/python -m pip install --upgrade pip’ command.


[manager] Python dependencies were installed from /app/healthcare-prediction/requirements.txt using pip.


[manager] Processed dependencies!





2021-08-19 00:51:05.227 Uncaught app exception


Traceback (most recent call last):


File “/home/appuser/venv/lib/python3.8/site-packages/streamlit/script_runner.py”, line 350, in _run_script


exec(code, module.__dict__)

File “/app/healthcare-prediction/model_integration.py”, line 145, in


model = HospitalPricingClassifier()

File “/app/healthcare-prediction/model_integration.py”, line 32, in init


emp = pickle.load(pickle_off)

_pickle.UnpicklingError: invalid load key, ‘v’.


2021-08-19 01:21:13.223 Uncaught app exception


Traceback (most recent call last):


File “/home/appuser/venv/lib/python3.8/site-packages/streamlit/script_runner.py”, line 350, in _run_script


exec(code, module.__dict__)

File “/app/healthcare-prediction/model_integration.py”, line 145, in


model = HospitalPricingClassifier()

File “/app/healthcare-prediction/model_integration.py”, line 32, in init


emp = pickle.load(pickle_off)

_pickle.UnpicklingError: invalid load key, ‘v’.


2021-08-19 01:35:23.864 Uncaught app exception


Traceback (most recent call last):


File “/home/appuser/venv/lib/python3.8/site-packages/streamlit/script_runner.py”, line 350, in _run_script


exec(code, module.__dict__)

File “/app/healthcare-prediction/model_integration.py”, line 145, in


model = HospitalPricingClassifier()

File “/app/healthcare-prediction/model_integration.py”, line 32, in init


emp = pickle.load(pickle_off)

_pickle.UnpicklingError: invalid load key, ‘v’.


2021-08-19 02:05:24.577 Uncaught app exception


Traceback (most recent call last):


File “/home/appuser/venv/lib/python3.8/site-packages/streamlit/script_runner.py”, line 350, in _run_script


exec(code, module.__dict__)

File “/app/healthcare-prediction/model_integration.py”, line 145, in


model = HospitalPricingClassifier()

File “/app/healthcare-prediction/model_integration.py”, line 32, in init


emp = pickle.load(pickle_off)

_pickle.UnpicklingError: invalid load key, ‘v’.


2021-08-19 02:35:25.129 Uncaught app exception


Traceback (most recent call last):


File “/home/appuser/venv/lib/python3.8/site-packages/streamlit/script_runner.py”, line 350, in _run_script


exec(code, module.__dict__)

File “/app/healthcare-prediction/model_integration.py”, line 145, in


model = HospitalPricingClassifier()

File “/app/healthcare-prediction/model_integration.py”, line 32, in init


emp = pickle.load(pickle_off)

_pickle.UnpicklingError: invalid load key, ‘v’.


2021-08-19 04:54:10.716 Uncaught app exception


Traceback (most recent call last):


File “/home/appuser/venv/lib/python3.8/site-packages/streamlit/script_runner.py”, line 350, in _run_script


exec(code, module.__dict__)

File “/app/healthcare-prediction/model_integration.py”, line 145, in


model = HospitalPricingClassifier()

File “/app/healthcare-prediction/model_integration.py”, line 32, in init


emp = pickle.load(pickle_off)

_pickle.UnpicklingError: invalid load key, ‘v’.


2021-08-19 05:24:11.969 Uncaught app exception


Traceback (most recent call last):


File “/home/appuser/venv/lib/python3.8/site-packages/streamlit/script_runner.py”, line 350, in _run_script


exec(code, module.__dict__)

File “/app/healthcare-prediction/model_integration.py”, line 145, in


model = HospitalPricingClassifier()

File “/app/healthcare-prediction/model_integration.py”, line 32, in init


emp = pickle.load(pickle_off)

_pickle.UnpicklingError: invalid load key, ‘v’.


2021-08-19 17:44:50.784 Uncaught app exception


Traceback (most recent call last):


File “/home/appuser/venv/lib/python3.8/site-packages/streamlit/script_runner.py”, line 350, in _run_script


exec(code, module.__dict__)

File “/app/healthcare-prediction/model_integration.py”, line 145, in


model = HospitalPricingClassifier()

File “/app/healthcare-prediction/model_integration.py”, line 32, in init


emp = pickle.load(pickle_off)

_pickle.UnpicklingError: invalid load key, ‘v’.


2021-08-19 18:23:54.151 Uncaught app exception


Traceback (most recent call last):


File “/home/appuser/venv/lib/python3.8/site-packages/streamlit/script_runner.py”, line 350, in _run_script


exec(code, module.__dict__)

File “/app/healthcare-prediction/model_integration.py”, line 145, in


model = HospitalPricingClassifier()

File “/app/healthcare-prediction/model_integration.py”, line 32, in init


emp = pickle.load(pickle_off)

_pickle.UnpicklingError: invalid load key, ‘v’.


2021-08-19 18:26:40.484 Uncaught app exception


Traceback (most recent call last):


File “/home/appuser/venv/lib/python3.8/site-packages/streamlit/script_runner.py”, line 350, in _run_script


exec(code, module.__dict__)

File “/app/healthcare-prediction/model_integration.py”, line 145, in


model = HospitalPricingClassifier()

File “/app/healthcare-prediction/model_integration.py”, line 32, in init


emp = pickle.load(pickle_off)

_pickle.UnpicklingError: invalid load key, ‘v’.