When working on tests for distances I discovered this, because I was setting the position for all keypoints to be 0. But this could also happen if the two chosen keypoints happen to be in the same location, or the mean distance somehow otherwise ends up being zero.
https://github.com/sign-language-processing/pose/blob/master/src/python/pose_format/pose.py#L120
Obviously this is very unlikely, but if it does happen it fills the body.data with nan.
/pose/src/python/pose_format/pose.py:123: RuntimeWarning: divide by zero encountered in divide
scale = scale_factor / mean_distance