FileNotFoundError: [Errno 2] No such file or directory

Hi, this is Rick. I have been spending a whole day dealing with this problem. When I added my app to the cloud, it cannot find the image. I used the relative path to locate the image and this method worked well in my local computer. But when I move to the cloud, the error occurred. That’s strange. I guess the error is about the path but I cannot find a workable solution.
My code is attached: GitHub - RickLin616/3170


The local app looks like this.

While on the cloud, I got an error.

You need to use forward slashes and not backslashes. A local Windows environment will happily accept either, but Streamlit Cloud is a Debian container.

1 Like