Sorry for the i didn't make it clear.
Let me say this way.

E.g you are using raise Exception in __init__ at 37.
But here, you are catching SystemExit

The correct way is either to use sys.exit and catch SystemExit, or use raise and catch Exception .
Mixing using them makes no sense.