[PyQt] Undefined "typeinfo" for KDEDModule while trying to create PtKF5

Shaheed Haque srhaque at theiet.org
Thu Apr 21 18:48:23 BST 2016


Phil,

That was the problem:

$ python
...
>>> from PyQt5 import QtCore
>>> from PyQt5 import QtDBus
>>> from PyKF5 import KDBusAddons
>>> help(KDBusAddons)
...etc...
>>>

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?).

Thanks, Shaheed


On 21 April 2016 at 15:48, Phil Thompson <phil at riverbankcomputing.com>
wrote:

> On 20 Apr 2016, at 8:27 pm, Shaheed Haque <srhaque at theiet.org> wrote:
> >
> > OK, after a bit of poking around, I realised I had not followed the
> > advice to add the library being bound to the makefile.extralibs. With
> > that in place, the error changes as follows, here with the linker
> > command line
> > for reference:
> >
> > g++ -Wl,-Bsymbolic-functions -Wl,-z,relro -shared
> > -Wl,--version-script=KDBusAddons.exp -o KDBusAddons.so
> > sipKDBusAddonscmodule.o sipKDBusAddonsKDEInitInterface.o
> > sipKDBusAddonsKDEDModule.o sipKDBusAddonsKDBusService.o
> > sipKDBusAddonsKDBusInterProcessLock.o
> > sipKDBusAddonsKDBusConnectionPool.o -lKF5DBusAddons
> >
> > And the actual Python error:
> >
> > $ PYTHONPATH=cxx/KDBusAddons python
> > Python 2.7.10 (default, Oct 14 2015, 16:09:02)
> > [GCC 5.2.1 20151010] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> >>>> import KDBusAddons
> > Traceback (most recent call last):
> >  File "<stdin>", line 1, in <module>
> > SystemError: dynamic module not initialized properly
> >
> > Using Google, I found several references to this message, but none
> > seemed relevant [1]. Any suggestions on how to debug this? Or thoughts
> > on what might be missing?
>
> I assume that KDBusAddons imports other KDE modules - if so what happens
> when you explicitly import those first?
>
> That exception will be raised when the import fails but no exception is
> raised to say why. You can look though the code of the SIP_MODULE_ENTRY()
> function and see exactly which call to SIP_MODULE_RETURN() is being made to
> get a better idea of where the problem is.
>
> Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160421/1d089c47/attachment.html>


More information about the PyQt mailing list