hi. I tried to deploy a streamlit app to render, but I got the following error:
FileNotFoundError: [Errno 2] No such file or directory: 'images/icon.png'
Traceback:
File "/opt/render/project/src/.venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)File "/opt/render/project/src/brookfield.py", line 149, in <module>
main()File "/opt/render/project/src/brookfield.py", line 26, in main
icon = Image.open('images/icon.png')File "/opt/render/project/src/.venv/lib/python3.9/site-packages/PIL/Image.py", line 3236, in open
fp = builtins.open(filename, "rb")
I’m pretty sure that there is a file named icon.png
in a folder called images
in the same directory as the .py file. The web app runs perfectly locally until it is deployed to render. What could be wrong, and how do I solve this issue, please?