Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71504
| References | <dfd3499c6de144b787a430d081a72e59@exch.activenetwerx.com> |
|---|---|
| Date | 2014-05-14 03:05 +1000 |
| Subject | Re: Exception problem with module |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.9976.1400000752.18130.python-list@python.org> (permalink) |
On Wed, May 14, 2014 at 2:59 AM, Joseph L. Casale <jcasale@activenetwerx.com> wrote: > During handling of the above exception, another exception occurred: > > File "C:/dir/test.py", line 12, in <module> > 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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Exception problem with module Chris Angelico <rosuav@gmail.com> - 2014-05-14 03:05 +1000
csiph-web