[PySide] init function not found in dynamic modules

Roman Yurchak rth at crans.org
Mon Aug 6 11:05:41 CEST 2012


Hello,

recently while trying to complete the the following tutorial
 http://lynxline.com/superhybrids-part-2-now-qt-pyside/
I run into an error saying:
ImportError: dynamic module does not define init function (initPyHybrid)

Basically the code compiles fine, though with a lot of warnings. You can
find the source code in this repo https://github.com/rth/pyside-hybrid
and the compilation log here http://pastebin.com/thMbneHi However when I
try to import the created module I get the previously cited error.
In the generated cpp code there is something that looks like an init
function (see http://pastebin.com/JByDAF5Z) so was wondering if you
would know what could be wrong?

I'm using gcc 4.6.3, pyside 1.1.1 and qt 4.8.2 on Gentoo Linux. However
an other person run into exactly the same error with an older version of
qt (4.7) and pyside (0.*) on Mac OS X. If I understand correctly with
pyside 1.1.1 the line
  generatorrunner --generatorSet=shiboken ...
has to be replaced by
  shiboken ...
right?

I noticed that there are a couple of warning like
 " warning: missing initializer for member ‘PyMethodDef:: .."
that may be related. And I was also surprised by the fact that when I
give shiboken a wrong path to typesystem.xml it still generates the same
number of warnings and doesn't fail.

I would be really grateful for any advice.
Thank you in advance,
-- 
Roman Yurchak



More information about the PySide mailing list