I am on windows, using jupyter notebook, Mediapipe:Holistic Solution, Python, tensorflow.

I am using a Holistic solution and trying to get the left hand, right hand and pose landmarks. I am giving my webcam feed as input.

When I run the code below, there are no errors and everything is good.

After this, I was trying to check if I got the landmarks by using "results.left_hand_landmarks.landmark" and length of the landmarks using "len(results.left_hand_landmarks.landmark)" I am getting this "AttributeError: 'NoneType' object has no attribute 'landmark'"

The funny part is the problem is only with left hand and right hand landmarks. I was able to get the Pose landmarks and its length. Please help.

    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 = cap.read()

        # 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'):

2 Answers 2


You probably didn't show your hands, so it was not registered and currently has its default value which is None. And just because of it you have pose landmarks. So, to get rid of that error you just need to show your hands, so mediapipie managed to track them, and then you can display them.

  • $\begingroup$ Thanks for answering. Actually I felt the same way you did and tried multiple times to show my both hands to the webcam. And no luck. The issue still persists. My webcam's resolution is 720p HD. I don't know if that's the issue may be. But for some reason it doesn't track my hands. Please help. $\endgroup$
    – Escanor6
    Commented May 1, 2022 at 14:41

i am also facing a similar situation, i used ip webcam and it worked but the server webcam lags a lot so i am not able to create the dataset from it

  • $\begingroup$ This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From Review $\endgroup$
    – Broele
    Commented May 7 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.