Write a NormalizedLandmarkList

Hi, I am new in Python and I am trying to save Landmarks in a code for pose tracking
Code works fine when I print to terminal:
print(“test”,results.pose_landmarks)
But instead, I want to write a file with all landmarks
When I run, I got next error
write() argument must be str, not NormalizedLandmarkList
Hope anybody can help me. Thanks in advance

image.flags.writeable = False
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
results = holistic.process(image)

# Draw landmark annotation on the image.
image.flags.writeable = True
image = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
mp_drawing.draw_landmarks(
    image,
    results.pose_landmarks,
    mp_holistic.POSE_CONNECTIONS,
    landmark_drawing_spec=mp_drawing_styles
    .get_default_pose_landmarks_style())
cv2.imshow('MediaPipe Holistic', image)
if cv2.waitKey(5) & 0xFF == 27:
  break

cap.release()
#print(“test”,results.pose_landmarks)
with open(‘test1’,‘a+’) as f:
f.write(results.pose_landmarks)
f.close()

unfortunately, this is NOT from opencv.
please find out, WHERE THAT IS FROM, link us to the docs (and READ those yourself !)

then maybe we can help solving your puzzle.

code involves mediapipe.

you need to find a forum for mediapipe. we don’t support that here.

Thank you an sorry for that

Thank you and sorry for that