[PyQt] Exceptions swallowed in QWebPage::extension

Florian Bruhin me at the-compiler.org
Tue Sep 2 17:48:05 BST 2014

* Phil Thompson <phil at riverbankcomputing.com> [2014-09-02 16:22:23 +0100]:
> On 28/08/2014 5:46 pm, Florian Bruhin wrote:
> >Hi,
> >
> >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 don't see how this is a PyQt bug. How do you expect the call to
> extension() to be triggered? For my ISP I simply get a correctly downloaded
> page that says there is no such site.
> Phil

Huh, okay. I get an error page saying the host could not be found.

The attached example shows the same issue using the multiple files
extension. When clicking "Choose files" the extension method is run
until the exception (which is never printed).


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: exc_test2.py
Type: text/x-python
Size: 539 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140902/db7d788e/attachment.py>
-------------- 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/20140902/db7d788e/attachment.sig>

More information about the PyQt mailing list