Error trying to deploy app

Hello,

Can anyone tell me how to fix this error?

Hey @Blake_Starnes,

Can you please share a code snippet and a link to your app’s GitHub repo so we can try to reproduce this error?

Try dlib-bin instead

All,

I re-configured the setup today to use environments file instead of requirements file. Unfortunately, still not working. And I believe I tried dlib-bin with each file.

This is the error I am getting now:

This is the environments file I am using:

name: base

channels:

  • defaults
  • conda-forge

dependencies:

  • matplotlib=3.7.0
  • numpy=1.24.3
  • opencv-python-headless
  • streamlit=1.11.0
  • pytorch=2.0.1
  • dlib-bin
  • pip
  • pip:
    • pandas==2.0.3
    • tensorflow==2.13.0
    • imutils==0.5.4
    • plotly==5.13.1
    • pillow==9.5.0

@Franky1 Any advice?

Adding these additional packages fixed the issue:
build-essential cmake pkg-config
libx11-dev libatlas-base-dev
libgtk-3-dev libboost-python-dev

The app can now run - so I have a new issue - app requires webcam access → how can I allow that? Chrome only enables Webcam access if prompted and I do not get a request to allow, so there’s no way for me to update Chrome to allow for the Webcam access for the Streamlit URL I am using. Any ideas?

Their documentation (Use your camera & microphone - Computer - Google Chrome Help) has no info on how to allow without a prompt for a site.

The issue is I was using this video capture command to start the video feed which worked locally. However with Streamlit, this is running on the server and will not prompt the user to start the video capture, right? Any ideas on how to fix?

Can you share the application url ?

https://focustrak-fwdtcjbmrr26vlvteuzyrk.streamlit.app/

Hey, @Blake_Starnes thanks for posting.

The reason why it is working on your local but not on the server is simply because your server doesn’t have a webcam :smiling_face_with_tear:. And when you run the command cv2.VideoCapture(), OpenCV looks for a webcam on the machine which is running the code. So when on local, your machine has a webcam but your server does not.

Solution for this:

:point_right:t2: Use the library streamlit-webrtc in your code.

you can also look for the tutorial from PyCon JP.

I hope your problem is solved now…:smiling_face:

PS: I think this is your only option if you want to use a webcam for processing. But I have tried it myself and it will surely reduce your frame rates when running on the server because it takes time for every frame to upload from the user side to the server and then processing it and returning it again to the user.
That is why many live video processing tools run on apps rather than on browsers.
But it is always fun to use such kind of custom tools … I would recommend you to go for this.

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