0

I had been getting this message since the last few days when i run this code

img = cv2.VideoCapture(0)

while(True):
    re, frame = img.read()
    print(frame)

cv2.release()

here's the complete error

 OpenCV: not authorized to capture video (status 0), requesting...
    [Finished in 2.2s with exit code -6]
    [cmd: ['python3', '-i', '-u', '/Users/admin/Documents/h.py']]
    [dir: /Users/admin/Documents]
    [path: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands]

and this message pops up

enter image description here

earlier the code would run just fine but i have just recently started dealing with it. i am using macOs catalina.

1

0