Would like the difference between local host and deployment

hello there,
I opened in my ownrepo from streamlit correctly, but when I use my local hostI have gotten this error:

File "/opt/homebrew/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)
File "/Users/migueldefrutos/Documents/Bootcamp/Data_Bridge /Alumno /ds_thebridge_11_22/Entregas/Machine/Startups/src/streamlit/proyecto.py", line 15, in <module>
    with open('streamlit/model/model_miguel_recall.pkl', 'rb') as re:

The problem is; when I use the stremlit’s link everything works as hoped, but my local host doesn’t read the path I wrote there…

So I don’t know if deploy and local host has compatibility.

Thanks a lot for any help

Probably you are starting your streamlit app from a different (sub)folder and therefore the relative path does not match.

this is the repo.

But I wrote down in my terminal:
streamlit run proyecto.py
from the same path where my .py is, and I issued that error.

But if you run the link I have on my readme, everything works great

You don’t run it from the root folder, therefore the relative paths do not match anymore. Call your app from the root folder and try this:

streamlit run streamlit/proyecto.py
1 Like

My bad @Franky1, thanks a lot!

I got it

I appreciate it