No problem.
The index error comes from the Metropolis sampler - it gives invalid proposal value for DiscreteUniform (for example propose +2 when the last value is 499, which gives the next value 501 that goes out of bound).
2 Likes