File not found error while deployment using pickle

:rotating_light: Before clicking “Create Topic”, please make sure your post includes the following information (otherwise, the post will be locked). :rotating_light:

  1. link to deployed app.link to deployed code
  2. Git hub file github repo file
    Error code

2023-10-22 14:45:34.522 Uncaught app exception


Traceback (most recent call last):


File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 541, in _run_script


exec(code, module.__dict__)

File “/app/diabetesprediction-model/main.py”, line 16, in


loaded_model = pickle.load(open("Streamlit_rakuten/D:/my programs/machine learning/New folder/DiabetesPrediction-Model/trained_model.sav", 'rb'))

FileNotFoundError: [Errno 2] No such file or directory: ‘Streamlit_rakuten/D:/my programs/machine learning/New folder/DiabetesPrediction-Model/trained_model.sav’


4. The model is working fine in local machine but I am unable to deploy, even used full absolute path and streamlit_rakuten after going through some articles.
please give the correct instrucitons.

Hi @devacius ,

Are you trying to run it in your local machine or from GitHub?

If it from GitHub, then the path you have given is your local PC path redirect to GitHub path.

Hello krishna , Thanks for responding. Would the absolute path give some errors . when you mean Github path are your trying to say relative path or something else?