Error while capturing video using opencv in WSL2

CODE

cap = cv2.VideoCapture(0)
while True:
# Capture frame-by-frame
     ret, frame = cap.read()
     # if frame is read correctly ret is True
     if not ret:
         print("Can't receive frame (stream end?). Exiting ...")
         break
     # # Our operations on the frame come here
     gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
     # Display the resulting frame
     cv2.imshow('frame', frame)
     if cv2.waitKey(1) == ord('q'):
         break

ERROR OUTPUT

[ WARN:0@10.062] global cap_v4l.cpp:1134 
tryIoctl VIDEOIO(V4L2:/dev/video0): select() timeout.
Can't receive frame (stream end?). Exiting ..

.

i also tried to sudo guvcview from wsl2, and it work fine, and i can also find my devices by running ls -al /dev/video*