whitphx/streamlit-webrtc

Error when running Streamlit app: FileNotFoundError

kumarkhagendra909 opened this issue · 0 comments

I'm encountering an issue when trying to run my Streamlit app using the command streamlit run .\home.py. The following error message is displayed in the terminal:
PS D:\streamlit-webrtc-main\streamlit-webrtc-main> streamlit run .\home.py

[2023-09-28 17:06:35,579] WARNING from sample_utils.turn in D:\streamlit-webrtc-main\streamlit-webrtc-main\sample_utils\turn.py:24: Twilio credentials are not set. Fallback to a free STUN server from Google.
2023-09-28 17:06:37.978 ComponentRequestHandler: GET D:\streamlit-webrtc-main\streamlit-webrtc-main\streamlit_webrtc\frontend\build\index.html read error
Traceback (most recent call last):
File "C:\Users\hp.conda\envs\torch\Lib\site-packages\streamlit\web\server\component_request_handler.py", line 55, in get
with open(abspath, "rb") as file:
^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'D:\streamlit-webrtc-main\streamlit-webrtc-main\streamlit_webrtc\frontend\build\index.html'

this error happened when I launched this Streamlit app homepage, till this everything worked fine and which i clicked on the object detection application page from the sidebar the above-mentioned error came, to give clear visualization I am attaching the screenshot of codespace I used and browser interface.
Screenshot (704)
Screenshot (705)
Screenshot (706)
Screenshot (707)
Screenshot (708)

I tried to resolve this issue in the following ways:

  1. installed node_modules with npm command as we do it for the react project at first while running got the issue in ...frontend folder present inside the streamlit-webrtc folder but this doesnot work.
  2. then I tried to create a folder named build which was missing earlier, after having the build it asked me to install twile library which I did, and after having all this latest error is attached in the image.

I believe the problem is coming from the package itself somewhere ../runner/.. that uses some dictionary or maybe it is the issue coming because of some missing error handling inside the streamlit rendering functionality that does not get the path of the html renders.
if the issue is not with the package then it may be possible that some files are not uploaded in the repo that is needed to be done.