Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'attribute': 0.07; 'exception,': 0.09; 'subject:module': 0.09; 'cc:addr:python-list': 0.11; 'class),': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'typeerror:': 0.16; 'exception': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'cc:addr:python.org': 0.22; 'print': 0.22; 'subject:problem': 0.24; 'cc:2**0': 0.24; 'handling': 0.26; 'header:In-Reply-To:1': 0.27; 'resolution': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'catching': 0.31; 'file': 0.32; 'another': 0.32; 'subject:with': 0.35; 'classes': 0.35; 'except': 0.35; 'received:google.com': 0.35; 'really': 0.36; '14,': 0.36; 'should': 0.36; '12,': 0.39; 'is.': 0.60; 'show': 0.63; 'to:none': 0.92 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:cc :content-type; bh=BE06e9HQ+Oy51ERiKjqXqdoPi4ODsQfP9mU7y7kum78=; b=JvSU11Vq08S3eMxThxnxh4mcDGUbS+yBizPT/oQg8gGU1dDMVxuIqMNRFox8ihF4aC iBHwCXh7M0NBDaJ5uIbDERY+QBEcY65gW1+O5lXhIkq1iE1QzJE0M7a5pwIk18uHr6Te bm0YrnJ32CbN84sLVaueO8JaDwWgMHliRr7kCF1lKYAxVT3FJhnBtMWPSlkvwsCqL2Af oCqZNSYD2TSs1fj5I8kysrYGbI/zFuOelRYTj6zvVsqF5pHxDExwwtxDZKe7gyqPZKfV f/rnZQgXiKD6Uq2xLS2QLUwYIQChATttubE6zqCQzEQCjUJa073Z8D1o3hzuufcIWzvT Mbew== MIME-Version: 1.0 X-Received: by 10.58.94.135 with SMTP id dc7mr833354veb.66.1400000749401; Tue, 13 May 2014 10:05:49 -0700 (PDT) In-Reply-To: References: Date: Wed, 14 May 2014 03:05:49 +1000 Subject: Re: Exception problem with module From: Chris Angelico Cc: Python Content-Type: text/plain; charset=UTF-8 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1400000752 news.xs4all.nl 2954 [2001:888:2000:d::a6]:38335 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:71504 On Wed, May 14, 2014 at 2:59 AM, Joseph L. Casale wrote: > During handling of the above exception, another exception occurred: > > File "C:/dir/test.py", line 12, in > except a_new_name as exc: > TypeError: catching classes that do not inherit from BaseException is not allowed Best would be to print out what's in a_new_name to see if it really is what you think it is. If you think it is what you think it is, have a look at its __mro__ (method resolution order, it's an attribute of every class), to see what it's really inheriting. That should show you what's happening. ChrisA