[PyQt] Exceptions swallowed in QWebPage::extension

Phil Thompson phil at riverbankcomputing.com
Tue Sep 2 18:27:37 BST 2014

On 02/09/2014 5:48 pm, Florian Bruhin wrote:
> * 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).

Got it - fixed in tonight's PyQt4 and PyQt5 snapshots.


More information about the PyQt mailing list