I used sys.maxint here to fix the problem on my windows machine. Not sure which is a better solution (2**31-1 might not work on 32 bit windows?).