Sometimes, our PyQt5 GUI almost mysteriously does not show up or crashes and we see no error output in the console.
We create a reusable module using sys.excepthook
We import the excepthook module into our code
We save the exceptions and print them to the console