# OSError

**URL:** <https://discuss.streamlit.io/t/oserror/59103>\
**Category:** Community Cloud\
**Tags:** streamlit-cloud\
**Created:** [January 8, 2024, 5:07pm UTC](https://discuss.streamlit.io/t/oserror/59103 "2024-01-08T17:07:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![farhadfarahanii](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/farhadfarahanii/32/36901_2.png) [@farhadfarahanii](https://discuss.streamlit.io/u/farhadfarahanii)\
**Post date:** [January 8, 2024, 5:07pm UTC](https://discuss.streamlit.io/t/oserror/59103/1 "2024-01-08T17:07:25Z")

</div>

Hi guys, I’m trying to deploy my app on Streamlit cloud, but every time encountering the OSError! The app is working well in local machine and I have this issue only in cloud environment for deploying. Already tried pathlib, but still haven’t got any success to solve this problem. here is the Error message:

OSError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).

Traceback:

```auto
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module. __dict__ )File "/mount/src/image_captioning/code/streamlit.py", line 20, in <module>
    caption_model_vgg = keras.models.load_model(model_path)File "/home/adminuser/venv/lib/python3.9/site-packages/keras/src/saving/saving_api.py", line 262, in load_model
    return legacy_sm_saving_lib.load_model(File "/home/adminuser/venv/lib/python3.9/site-packages/keras/src/utils/traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from NoneFile "/home/adminuser/venv/lib/python3.9/site-packages/keras/src/saving/legacy/save.py", line 234, in load_model
    raise IOError(

```

and here is the original link of the app in cloud:

[app-streamlit-cloud](https://imagecaptioning-gcj82kxrg939bkdeema3hy.streamlit.app/)

and also here is the Github link of the code:

[github-app-code](https://github.com/farhadfarahanii/Image_Captioning/blob/main/code/streamlit.py)

Please help me to solve this problem! Thanks!

---

<div class="post-metadata">

**Author:** ![tonykip](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/tonykip/32/45167_2.png) [@tonykip](https://discuss.streamlit.io/u/tonykip)\
**Post date:** [January 8, 2024, 5:26pm UTC](https://discuss.streamlit.io/t/oserror/59103/2 "2024-01-08T17:26:32Z")

</div>

> [@farhadfarahanii](#):
>
> github-app-code

Thanks for posting.

The issue is with the file path. Change the paths to look like this:

```auto
model_path = 'models/caption_mode_with_vgg16.h5'

```

and

```auto
csv_file_path = 'data/cleaned_caption.csv'

```

Let me know if this resolves the issue.

---

<div class="post-metadata">

**Author:** ![farhadfarahanii](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/farhadfarahanii/32/36901_2.png) [@farhadfarahanii](https://discuss.streamlit.io/u/farhadfarahanii)\
**Post date:** [January 9, 2024, 6:55pm UTC](https://discuss.streamlit.io/t/oserror/59103/3 "2024-01-09T18:55:51Z")

</div>

Thank you very much, @tonykip! Following your recommended path format, I can now see that my application has been deployed flawlessly. I appreciate you taking the time to investigate my problem and share the solution. Thank you once again!

---

<div class="post-metadata">

**Author:** ![tonykip](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/tonykip/32/45167_2.png) [@tonykip](https://discuss.streamlit.io/u/tonykip)\
**Post date:** [January 9, 2024, 8:43pm UTC](https://discuss.streamlit.io/t/oserror/59103/4 "2024-01-09T20:43:10Z")

</div>

Glad it worked @farhadfarahanii, happy Streamlit-ing! 🎈

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [January 11, 2024, 8:43pm UTC](https://discuss.streamlit.io/t/oserror/59103/5 "2024-01-11T20:43:51Z")

</div>

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