<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Maxwell, thanks for the tip. After reading that it turns out all you have to do is use any custom exvepthook and it will prevent the abort call:<div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 15px; line-height: normal; font-family: Monaco; color: rgb(225, 225, 225); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #d03bff" class="">def</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #7f7d26" class="">no_abort</span><span style="font-variant-ligatures: no-common-ligatures" class="">(a, b, c):</span></div><div style="margin: 0px; font-size: 15px; line-height: normal; font-family: Monaco; color: rgb(225, 225, 225); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    sys.__excepthook__(a, b, c)</span></div><div style="margin: 0px; font-size: 15px; line-height: normal; font-family: Monaco; color: rgb(205, 121, 35); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">sys.excepthook</span><span style="font-variant-ligatures: no-common-ligatures; color: #e1e1e1" class=""> =</span><span style="font-variant-ligatures: no-common-ligatures; color: #f4f4f4" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #e1e1e1" class="">no_abort</span></div></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 10, 2017, at 7:57 PM, Maxwell Grady <<a href="mailto:max.grady@gmail.com" class="">max.grady@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">PyQt > 5.5 will always Abort when there is an unhandled exception which in this case is the TypeError as a result of the raise statement. (<a href="http://pyqt.sourceforge.net/Docs/PyQt5/incompatibilities.html" class="">http://pyqt.sourceforge.net/Docs/PyQt5/incompatibilities.html</a>)<div class=""><br class=""></div><div class="">To my knowledge that behavior can't be turned off with any form of configuration. </div><div class=""><br class=""></div><div class="">-Maxwell</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Feb 10, 2017 at 10:46 PM, Patrick Stinson <span dir="ltr" class=""><<a href="mailto:patrickkidd@gmail.com" target="_blank" class="">patrickkidd@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Oh yes, and I’m using Qt/PyQt@5.7.1 with python3.5<div class=""><div class="h5"><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Feb 10, 2017, at 7:45 PM, Patrick Stinson <<a href="mailto:patrickkidd@gmail.com" target="_blank" class="">patrickkidd@gmail.com</a>> wrote:</div><br class="m_2544888005605295039Apple-interchange-newline"><div class=""><div style="word-wrap:break-word" class="">Hello!<div class=""><br class=""></div><div class="">Is there any way to configure PyQt5 not to trigger an abort trap when an exception is raised in the gui thread?</div><div class=""><br class=""></div><div class=""><div style="margin:0px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgb(0,0,0)" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">turin:pkdiagram patrick$ make run</span></div><div style="margin:0px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgb(0,0,0)" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Traceback (most recent call last):</span></div><div style="margin:0px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgb(0,0,0)" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">  File "/Users/patrick/Documents/dev/<wbr class="">pkdiagram/pkdiagram/scene.py", line 28, in mousePressEvent</span></div><div style="margin:0px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgb(0,0,0)" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">    raise 'sdsdfsd'</span></div><div style="margin:0px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgb(0,0,0)" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">TypeError: exceptions must derive from BaseException</span></div><div style="margin:0px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgb(0,0,0)" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">make: *** [run] Abort trap: 6</span></div><div style="margin:0px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgb(0,0,0)" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">turin:pkdiagram patrick$ </span></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thank you!</div><div class="">-P</div></div></div></blockquote></div><br class=""></div></div></div></div><br class="">______________________________<wbr class="">_________________<br class="">
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com" class="">PyQt@riverbankcomputing.com</a><br class="">
<a href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" rel="noreferrer" target="_blank" class="">https://www.<wbr class="">riverbankcomputing.com/<wbr class="">mailman/listinfo/pyqt</a><br class=""></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class="">University of New Hampshire</div><div class="">Department of Physics</div><div class="">Pohl Group</div><div class="">DeMeritt Hall 119</div><div class="">---</div>Síocháin agus Grá</div></div>
</div>
</div></blockquote></div><br class=""></div></body></html>