Range object cannot be interpreted as an integer

I think that script was written using Python2 and isn’t quite compatible with Python3. Python2 used to return list objects from the range command whereas Python3 doesn’t but you can convert back to the old-school by wrapping your range function in a list function:

'birth_day': list(range(1, 32)),
...