builtins.TypeError: catching classes that do not inherit from BaseException is not allowed

hongy...@gmail.com hongyi.zhao at gmail.com
Thu Dec 30 17:27:28 EST 2021


On Thursday, December 30, 2021 at 11:24:20 PM UTC+8, Chris Angelico wrote:
> On Fri, Dec 31, 2021 at 2:03 AM hongy... at gmail.com 
> <hongy... at gmail.com> wrote: 
> > See here [1] for the related discussion. 
> > 
> > [1] https://discuss.python.org/t/typeerror-catching-classes-that-do-not-inherit-from-baseexception-is-not-allowed/12800
> Why did you post in two places at once? Did you need more people to 
> tell you the same thing as the error message? 

Doing so may attract the attention of developers, such as increasing the content of traceback information to make troubleshooting easier, just as André Roberge says here [1].

[1] https://discuss.python.org/t/typeerror-catching-classes-that-do-not-inherit-from-baseexception-is-not-allowed/12800/6?u=hongyi-zhao

 > ChrisA

HZ


More information about the Python-list mailing list