[PySide] pyside hybrid app

Tommaso Vinci tommaso.vinci at polytechnique.fr
Fri Aug 24 15:05:11 CEST 2012


Thanks a MILLION!
that solved the problem!

now I can move on and translate my qt app...
(I'll be around soon asking for dumb questions!)

On Fri, Aug 24, 2012 at 2:48 PM, Yann Lanthony <yann.lanthony at gmail.com>wrote:

> Hi,
>
> I think the only problem is the way you name your package.
> The generated dynamic library is named libPyHybrid.dylib according to the
> TARGET defined in hybridpy/hybridpy.pro. But in your typesystem, you name
> your python module "hybridpy". The name you give in the typesystem has to
> be the one of the final python module because it is the one used to create,
> among other things, the init method of the module.
> So in your case, this method is called inithybridpy and that's why it
> fails to find a initPyHybrid method.
>
> Try one of these options :
> - set TARGET = hybridpy in your .pro
>  - or put <typesystem package="PyHybrid"> in your typesystem
>
> I think this should resolve your problem (I haven't tried on your project
> but I already faced such issues and this was the solution I found).
>
> Regards,
> Yann
>
> 2012/8/24 Tommaso Vinci <tommaso.vinci at polytechnique.fr>
>
>> Dear all,
>>
>> I'm trying to reproduce the hybrid app tutorial with pyside and can't get
>> it work.
>> I'm probably really close to the solution!
>>
>> first: I'm on a mac with qt and pyside installed.
>>
>> I'm able to compile the first qt library then run the generator without
>> (major) issues, and finally compile the hybrid stuff
>>
>> I end up with both libraries but when I try to import them in python I
>> get this error:
>> Traceback (most recent call last):
>>   File "Main.py", line 4, in <module>
>>     import PyHybrid
>> ImportError: dynamic module does not define init function (initPyHybrid)
>>
>>
>> I'm attaching a zip file of the source tree
>> I've seen someone struggling with the same error but there he had
>> problems with the LD_LIBRARY_PATH, in my case both libraries can resolve
>> all the dynamic loading
>>
>>
>> PyHybrid.so:
>>     libPyHybrid.1.dylib (compatibility version 1.0.0, current version
>> 1.0.0)
>>     /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>> version 125.2.11)
>>     /System/Library/Frameworks/Python.framework/Versions/2.6/Python
>> (compatibility version 2.6.0, current version 2.6.1)
>>     libpyside-python2.6.1.1.dylib (compatibility version 1.1.0, current
>> version 1.1.0)
>>     libshiboken-python2.6.1.1.dylib (compatibility version 1.1.0, current
>> version 1.1.0)
>>     libMainWindow.1.dylib (compatibility version 1.0.0, current version
>> 1.0.0)
>>     QtXml.framework/Versions/4/QtXml (compatibility version 4.7.0,
>> current version 4.7.4)
>>     QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0,
>> current version 4.7.4)
>>     QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0,
>> current version 4.7.4)
>>     /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
>> version 7.9.0)
>>     /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
>> version 830.0.0)
>>
>> libMainWindow.1.dylib:
>>     libMainWindow.1.dylib (compatibility version 1.0.0, current version
>> 1.0.0)
>>     QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0,
>> current version 4.7.4)
>>     QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0,
>> current version 4.7.4)
>>     /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
>> version 7.9.0)
>>     /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
>> version 830.0.0)
>>     /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>> version 125.2.11)
>>
>>
>> Hope someone can help me
>>
>> --
>> Tommaso Vinci
>> LULI - Ecole Polytechnique
>> +33 (0)1 69335427
>> tommaso.vinci at polytechnique.edu
>> http://www.luli.polytechnique.fr
>>
>>
>> _______________________________________________
>> PySide mailing list
>> PySide at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/pyside
>>
>>
>


-- 
Tommaso Vinci
LULI - Ecole Polytechnique
+33 (0)1 69335427
tommaso.vinci at polytechnique.edu
http://www.luli.polytechnique.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20120824/42fa9375/attachment.html>


More information about the PySide mailing list