Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'exception': 0.03; 'pil': 0.07; 'itself.': 0.11; 'file,': 0.15; '"right"': 0.16; 'ah,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'oct': 0.16; 'subject:exception': 0.16; 'traceback.': 0.16; 'wrote:': 0.17; 'bytes': 0.17; 'all,': 0.21; 'trying': 0.21; 'exceptions': 0.22; 'sorry,': 0.22; 'seems': 0.23; 'header:In- Reply-To:1': 0.25; 'looks': 0.26; 'question': 0.27; 'message- id:@mail.gmail.com': 0.27; 'source': 0.29; 'error': 0.30; 'primary': 0.30; 'code': 0.31; 'file': 0.32; 'could': 0.32; 'problem': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'wrong': 0.34; 'open': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'there': 0.35; '(i.e.': 0.36; 'anything': 0.36; 'subject:with': 0.36; 'does': 0.37; 'being': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'think': 0.40; 'is.': 0.62; 'more': 0.63; 'confirm': 0.64 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=M/RAdGdCxt/cgfjbUd7wPIrjmn8Jfj66FB69uJEZ0iw=; b=C+a38yfprrfwej+RDIJ55V12l7pJUXLCN6cgTQeOqAlD7qHbCNYAfCU5kDtlYT4WSS uGSl4tvVLA5h3VSw+Sxkh6IcXArP1QXiAqdRNgloqUMsSQpdZT551FHm0PihYjggaj1I MSdQ4k/CkDAI7BeR98pa346QekdbfTieVdaUH8g2mQs30Rszp1/28Ev6SsvcqvbM/mGI +QQdkFPOB2mEPMfUbKwt3uzqCqaG3TCtH/zQ799p9e8DwUYz0Ij449VyW+PtDAOocTlz nq9a3HMC1lTngUFG3zqsPMhdROdlmp/XZP0AAW2tGbytYoR+5VzM+MvpF30/E6f1N11o QEnw== MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 14 Oct 2012 16:09:44 +1100 Subject: Re: Understanding and dealing with an exception From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1350191388 news.xs4all.nl 6850 [2001:888:2000:d::a6]:56165 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31240 On Sun, Oct 14, 2012 at 4:01 PM, Vincent Davis 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