FileNotFoundError and BrokenPipeError

I’m trying to deploy my app however after fixing the requirements file and adding all the needed files I faced this new bug

FileNotFoundError
File “/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 584, in _run_script
exec(code, module.dict )File “/mount/src/cyperparent-grooming-detecation/2.FYPapp/pages/02_📚_Resources.py”, line 18, in
pic1 = Image.open(r"protection.png")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File “/home/adminuser/venv/lib/python3.11/site-packages/PIL/Image.py”, line 3277, in open
fp = builtins.open(filename, “rb”)



> ```
BrokenPipeError

File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 584, in _run_script
    exec(code, module.__dict__)File "/mount/src/cyperparent-grooming-detecation/2.FYPapp/01_🏠_Homepage.py", line 15, in <module>
    nltk.download('stopwords')File "/home/adminuser/venv/lib/python3.11/site-packages/nltk/downloader.py", line 823, in download
    show(File "/home/adminuser/venv/lib/python3.11/site-packages/nltk/downloader.py", line 769, in show
    print_to(

the files already exist in the repo and aI tried to change the path to repo using from pathlib import Path
logoPic = Path(“2.FYPapp”) / “Logo.png”

I also tried appending the path but I got a different error
I’m using python 3.11

App Repo 2

App

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