Understanding and dealing with an exception

Chris Angelico rosuav at gmail.com
Sun Oct 14 00:31:05 EDT 2012


On Sun, Oct 14, 2012 at 3:23 PM, Vincent Davis <vincent at vincentdavis.net> wrote:
> OverflowError: Python int too large to convert to C long
> line 266, in _maketile
>   bytecount = read(channels * ysize * 2)

Is the file over 2GB? Might be a limitation, more than a bug, and one
that could possibly be raised by using a 64-bit build.

Alternatively, you could deem them invalid for exceeding your file
size limit (either before passing to PIL, or on catching this
exception).

ChrisA



More information about the Python-list mailing list