cephalo
Deity
This is probably a very simplistic suggestion by your standards, but...
Does python use a base of 0 for indexes? If so, then for a list with N elements, legal indexes are 0 thru N-1, not 1 thru N. Since the error message lists the same length and index Id guess thats the issue.
The infrequency of the error would be confirmed because it would occur only when a random index equal to the last (really the last +1) element is indicated.
Yes it does use a base 0 for indexes, but the python randint function is supposed to return a value between 0 and N-1. I did some testing on this and my test loop ran for 20 minutes without a problem. So randint(100) should be between 0 and 99 inclusive. So when I say randint(len(list)), I should get a valid index providing the len function is giving me an accurate length. There might be a mistake in there somewhere still but I can't find it.