Deployed app can't find data file/folders

I’m trying to read image/text files from another folder to display in the app. It worked perfectly fine locally and I uploaded all the files into my repo. However, when it’s deployed, I get errors :

FileNotFoundError: [Errno 2] No such file or directory: 
'./dashboard/remote_paths.txt'

App: https://grounded-edit-training.streamlit.app/
GitHub repo: grounded-edit/playground/training_data_dashboard.py at main · anya-ji/grounded-edit · GitHub
Python version 3.10

What did I do wrong?

I see that you tried moving the streamlit app to the root of the repo, which is what I would have recommended. Is everything working as expected now?

1 Like

FYI, here is an explanation of how paths work on Community Cloud. The trick to remember is that streamlit run is executed from the root of your repository, not the directory containing your entrypoint file.

1 Like

Yes! Moving to root fixed the problem.

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