'How to fix an error with images when deploying my streamlit webapp?
I started by making a text file (requirements.txt) with all the versions of the libraries used in the code. So I opened a folder on GitHub and added all the necessary files.
I used Streamlit Sharing to deploy and it returned the following error:
File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/script_runner.py", line 379, in _run_script
exec(code, module.__dict__)
File "/app/orbitas-relativistics/webapp.py", line 15, in <module>
image1 = Image.open(r'C:/Users/isabe/.streamlit/titulo11.png')
File "/home/appuser/venv/lib/python3.7/site-packages/PIL/Image.py", line 2953, in open
fp = builtins.open(filename, "rb")
My code doesn't have the command fp = builtins.open(filename, "rb") and it doesn't even have 2953 lines. It only has 395.
About the images, I uploaded them inside the .streamlit folder of my Visual Studio Code (where the code is hosted). And it gives the error
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/isabe/.streamlit/titulo11.png'
Does anyone know what I should do to fix this error and proceed with the deployment of my site?
Thanks for any help.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
