No, I am talking about rupture.sample_number_of_occurrences(). I though that you wanted to report in the error message also the loop index where the error happened, and then the right index would be the "i" in the enumerate in the outer loop, not the original "i" in the inner loop.