Here is the code:
import cv2
import sys
cascPath = sys.argv[1]
faceCascade = cv2.CascadeClassifier(cascPath)
video_capture = cv2.VideoCapture(0)
while True:
# Capture frame-by-frame
ret, frame = video_capture.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
and this is where the error pops up:
cascPath = sys.argv[1]
I don't know if the error is because I have not started a list although when I did start a list nothing happened and the error was still there
(this is not all the code as stack overflow did not allow me although I think this should be enough)