Python Script collapsed after a method replace

Hi!
I changed PointsAtSegmentLengthFromPoint to PointsAtChordLengthFromPoint and my script decide to stop working correctly. I can’t find a logic reason for this, maybe someone have similar situation?

SegmentLength2
correct

ChordLength2
fail