[PyQt] Undefined "typeinfo" for KDEDModule while trying to create PtKF5
Shaheed Haque
srhaque at theiet.org
Thu Apr 21 20:18:45 BST 2016
Ah. I see now that when I reported the above, I had also changed/fixed my
paths to make sure I had a PyKF5 directory with a __init__.py, and you are
right, with that plumbing in place, it works without any trouble. For
example:
$ python -c 'from PyKF5 import KDBusAddons'
$ cd PyKF5
$ python -c 'import KDBusAddons'
Traceback (most recent call last):
File "<string>", line 1, in <module>
SystemError: dynamic module not initialized properly
So...I guess this is working as expected!
Thanks, Shaheed
On 21 April 2016 at 18:55, Phil Thompson <phil at riverbankcomputing.com>
wrote:
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160421/f04c85f2/attachment-0001.html>
More information about the PyQt
mailing list