[PyQt] Exceptions swallowed in QWebPage::extension

Florian Bruhin me at the-compiler.org
Fri Aug 29 08:54:10 BST 2014


* Florian Bruhin <me at the-compiler.org> [2014-08-28 18:46:18 +0200]:
> when a Python exception is raised in QWebPage::extension, the
> exception is never handled/printed. This is with Qt/PyQt 5.3.1.
> 
> See the attached example.
> 
> I suspect this is a bug in PyQt somewhere, right? What would be the
> most elegant way to work around it? I can only think of using a single
> shot QTimer to raise the ecxeption later in the mainloop (which
> works).

I also noticed when I re-raise the exception with the original
traceback ("yield from exc" or using .with_traceback()), it gets
ignored again.

This is just an uneducated guess, but maybe the traceback is somehow
"corrupted" and Python ignores the exception because of that?

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
             GPG 0xFD55A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140829/2d632ca9/attachment.sig>


More information about the PyQt mailing list