I’m trying to stream video input from webcam using webrtc_streamer and I’m facing some errors
Here is the python script code.
Code snippet:
import streamlit as st
from streamlit_webrtc import webrtc_streamer
st.title("My first Streamlit app")
st.write("Hello, world")
webrtc_streamer(key="example")
The error message I’m getting is
2023-01-05 22:24:26.417 Uncaught app exception
Traceback (most recent call last):
File "D:\Anaconda\envs\Simbolo\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in _run_script
exec(code, module.__dict__)
File "C:\Users\Aung Sann Thit\Pycharm\Projects\SLR_Word_Level\main.py", line 11, in <module>
webrtc_streamer(key="example")
File "D:\Anaconda\envs\Simbolo\lib\site-packages\streamlit_webrtc\component.py", line 589, in webrtc_streamer
webrtc_worker.process_offer(sdp_offer["sdp"], sdp_offer["type"])
File "D:\Anaconda\envs\Simbolo\lib\site-packages\streamlit_webrtc\webrtc.py", line 583, in process_offer
raise result
File "D:\Anaconda\envs\Simbolo\lib\site-packages\streamlit_webrtc\webrtc.py", line 225, in _process_offer_coro
await pc.setRemoteDescription(offer)
File "D:\Anaconda\envs\Simbolo\lib\site-packages\aiortc\rtcpeerconnection.py", line 828, in setRemoteDescription
transceiver = self.__createTransceiver(
File "D:\Anaconda\envs\Simbolo\lib\site-packages\aiortc\rtcpeerconnection.py", line 1067, in __createTransceiver
dtlsTransport = self.__createDtlsTransport()
File "D:\Anaconda\envs\Simbolo\lib\site-packages\aiortc\rtcpeerconnection.py", line 1044, in __createDtlsTransport
dtlsTransport = RTCDtlsTransport(iceTransport, self.__certificates)
File "D:\Anaconda\envs\Simbolo\lib\site-packages\aiortc\rtcdtlstransport.py", line 375, in __init__
self.__ctx = certificate._create_ssl_context()
File "D:\Anaconda\envs\Simbolo\lib\site-packages\aiortc\rtcdtlstransport.py", line 211, in _create_ssl_context
_openssl_assert(lib.SSL_CTX_use_certificate(ctx, self._cert._x509) == 1) # type: ignore
AttributeError: 'builtins.Certificate' object has no attribute '_x509'