[PyQt] PyQt5 crash on error

Kovid Goyal kovid at kovidgoyal.net
Sun Oct 2 04:27:56 BST 2016

You need to set sys.excepthook to your own function handler. If you do
that PyQt will no longer call abort() on unhandled exceptions.


On Sat, Oct 01, 2016 at 06:19:43PM +0000, Fredrik Averpil wrote:
> Hi,
> I recently found that an error generated by PyQt5 instantly crashes the
> application instead of just printing an error to the terminal (like PyQt4
> and PySide does).
> With PySide2, the application freezes up completely instead of crashing on
> the same kind of error. I created a bug report with repro code for this
> over at the PySide project:
> https://bugreports.qt.io/browse/PYSIDE-364
> I think it would be much better if PyQt5 would take the route that
> PySide/PyQt4 does, and not crash instantly at a trivial error like when
> calling a missing function.
> Would this be possible to take into consideration for PyQt5?
> Regards,
> Fredrik
> PS. Perhaps this is an issue with Qt5 and not PyQt5?

> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt


Dr. Kovid Goyal 

More information about the PyQt mailing list