cap = cv2.VideoCapture(0)

Set mediapipe model

with mp_holistic.Holistic(min_detection_confidence=0.5, min_tracking_confidence=0.5) as holistic:
while cap.isOpened():

    # Read feed
    ret, frame =

    # Make detections
    image, results = mediapipe_detection(frame, holistic)
    # Draw landmarks
    draw_styled_landmarks(image, results)

    # Show to screen
    cv2.imshow('OpenCV Feed', image)

    # Break gracefully
    if cv2.waitKey(10) & 0xFF == ord('q'):

I am unable to get rid of this error no matter what new thing i try to do
please help me solve this

New contributor

Mythra Y is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.