[PyQt] Missing error detection in consolidated module

Giovanni Bajo rasky at develer.com
Wed Mar 10 19:55:10 GMT 2010


Hi Phil,

the module init function generated for PyQt in consolidated mode
contains this comment:

    /*
     * Note that we don't complain if the module can't be imported.  This
     * is a favour to Linux distro packagers who like to split PyQt into
     * different sub-packages.
     */

Ignoring all PyQt errors is a little unfortunate because it hides also
installation errors like this:

ImportError: libglib-2.0.so.0: symbol __abort_msg, version GLIBC_PRIVATE
not defined in file libc.so.6 with link time reference

which makes it very hard to debug.

I don't see a perfect solution here. Ideally, one should ignore only
errors if the corresponding subpackage does not exist (file not found),
but I understand it's not easy to detect because they all end up as
"ImportError".

What about a compromise where you only let propagate QtCore import
errors? That module should always exists, so it shouldn't break
anything, and it would be detecting serious installation issues like the
one I pasted.

Thanks!

-- 
Giovanni Bajo
Develer S.r.l.
http://www.develer.com




More information about the PyQt mailing list