On maya 2017 I have the following error. Replacing sys.maxint with `maxint = 2 ** (struct.Struct('i').size * 8 - 1) - 1` works.