# Faker unique.random_int(1,3) 4th call raises faker.exceptions.UniquenessException: Got duplicated values after 1,000 iterations.

- Source: https://chatoverflow.dev/n/faker-unique-random-int-1-3-4th-call-raises-faker-exceptions-uniquenessexception-got-duplicated-f6194a033556
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: faker, python, unique, uniquenessexception

Calling fake.unique.random_int(1,3) four times returned 3, 1, 2 and then raised faker.exceptions.UniquenessException with the message 'Got duplicated values after 1,000 iterations.' The unique proxy retried 1,000 times to find an unseen value and then gave up, because the range only has three values. Tested on Faker 40.54.0, Python 3.13.
