Understanding and dealing with an exception

Chris Angelico rosuav at gmail.com
Sun Oct 14 01:09:44 EDT 2012


On Sun, Oct 14, 2012 at 4:01 PM, Vincent Davis <vincent at vincentdavis.net> wrote:
> I can open it is and all looks good using Pixelmator (I don't have Photoshop
> installed). I don't think there is anything wrong with the image.
>
> Part of my question is a result of being new to actually using exceptions in
> my programs and dealing with the exceptions is a primary part of what I need
> to do with this program. When I get an exception that seems to be an issue
> with PIL (i.e. not my program or a problem with the image) I am not sure
> what the "right" or conventional way to deal with it is.

Ah, okay. Sorry, I don't know PIL at all, and was just reading the
error message itself. It does seem that you're trying to read more
than 1<<31 bytes from a 1.2MB file, though you could confirm that by
looking at the source code - the file and line as in the traceback.

ChrisA



More information about the Python-list mailing list