[PyQt] Undefined "typeinfo" for KDEDModule while trying to create PtKF5
Phil Thompson
phil at riverbankcomputing.com
Thu Apr 21 18:55:50 BST 2016
On 21 Apr 2016, at 6:48 pm, Shaheed Haque <srhaque at theiet.org> wrote:
>
> Phil,
>
> That was the problem:
>
> $ python
> ...
> >>> from PyQt5 import QtCore
> >>> from PyQt5 import QtDBus
> >>> from PyKF5 import KDBusAddons
> >>> help(KDBusAddons)
> ...etc...
> >>>
Sorry, I'm confused. Are you saying that the above works?
But doing the KDBusAddons import without the PyQt5 imports doesn't?
> As you suggested, I did some debugging, and the code seems to get right to the bottom of sipKDBusAddonscmodule.cpp, such that some printf-debug like this :
>
> outfile << "at line " << __LINE__ << "\n" <<
> " QtCore: " << sipModuleAPI_KDBusAddons_QtCore <<
> " QtDbus: " << sipModuleAPI_KDBusAddons_QtDBus <<
> " sipModule: " << sipModule << "\n";
> SIP_MODULE_RETURN(sipModule);
> }
>
> emits *some* values:
>
> QtCore: 0x7f0027642c20 QtDbus: 0x7f0027197540 sipModule: 0x7f00307c6e88
>
> even in the error case. Is there some way to make the user experience more robust in this regard? (I'm going to poke around the PyImport_xxx APIs, but I assume there is a reason behind what is done at present?).
Python2 is much worse at reporting import failures than Python3.
Phil
More information about the PyQt
mailing list