Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #24405 > unrolled thread

Re: exception problem

Started byMRAB <python@mrabarnett.plus.com>
First post2012-06-24 23:59 +0100
Last post2012-06-24 23:59 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: exception problem MRAB <python@mrabarnett.plus.com> - 2012-06-24 23:59 +0100

#24405 — Re: exception problem

FromMRAB <python@mrabarnett.plus.com>
Date2012-06-24 23:59 +0100
SubjectRe: exception problem
Message-ID<mailman.1465.1340578759.4697.python-list@python.org>
On 24/06/2012 23:36, Chris Angelico wrote:
> On Mon, Jun 25, 2012 at 8:26 AM, Charles Hixson
> <charleshixsn@earthlink.net> wrote:
>> The code:
>>                finally:
>>                    print ("at finally")
>>                print ("chunks =")
>> produces this result:
>> path  3...
>
> Can you state more clearly the problem, please? I'm seeing output that
> can't have come from the code posted (for instance, immediately after
> the "at finally", I'm expecting to see the "chunks =" line), and I'm
> not seeing any exception information, so I can't even hazard a guess
> as to what's throwing the exception.
>
I'd expect the output of:

print (sys.exc_info()[:2])

between these two lines:

caught exception
at finally

That suggests to me that "sys" hasn't been imported and that's there's
another exception somewhere that we're not seeing.

> Presumably these are two methods in the same class, since you're
> calling it as "self.chunkLine", but beyond that, it's hard to know.
> Take off the try/except and let your exception go to console, that's
> usually the easiest thing to deal with.
>

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web