py2app cannot move to target thread error
Scott Frankel
leknarf at pacbell.net
Wed Aug 19 10:42:39 PDT 2009
Hello,
I'm stuck somewhere between macports and py2app. I'm hopeful that
someone here may be able to offer some advice on how to rectify my
build environment. (Apologies in advance if you're reading this
twice. I'm also posting the question on the pythonmac list.)
Exporting DYLD_PRINT_LIBRARIES=1 and running a test app built with
QtSql support and another one without it, I'm pretty sure that the
following line is the clue:
dyld: loaded: /opt/local/libexec/qt4-mac/plugins/sqldrivers/
libqsqlpsql.bundle
My question is, how do I access/get/compile the PSQL support my app
requires? My environment's qt4-mac, python26, and py2app are from
macports. The qt4-mac has the psql dependency:
py26-py2app-devel @0.4.2_1 (active)
py26-pyqt4 @4.5.4_0 (active)
qt4-mac @4.5.1_0+psql (active)
Thanks in advance!
Scott
On Aug 10, 2009, at 2:59 PM, Scott Frankel wrote:
>
> Hello,
>
> I'm troubleshooting a PyQt-PostgreSQL py2app error: "Cannot move to
> target thread". From the research I've done so far, I believe that
> the problem is due to an error in the way I've created my build
> environment.
>
> I used macports to create a build environment for my Python-PyQt-
> PostgreSQL app. I've used my environment to build simple apps that
> run happily. I'm now trying to build an app that leverages
> PostgreSQL and the app fails on launch with a Qt error: "Cannot
> move to target thread". Adding PyQt4.QtSql to py2app's option
> includes either causes or reveals the problem. eg:
>
> This works:
> OPTIONS = {'argv_emulation': True, 'includes': ['sip', 'PyQt4._qt']}
>
> This doesn't:
> OPTIONS = {'argv_emulation': True, 'includes': ['sip', 'PyQt4._qt',
> 'PyQt4.QtSql']}
>
> Researching the error, I've set DYLD_PRINT_LIBRARIES=1 in my shell
> and am looking for duplicate instances of Qt libraries. I'm not
> seeing anything obvious. But I also don't know exactly what to look
> for.
>
> For example, should I be concerned with dyld output running the app
> or building it? The last of the dyld output looks like this:
>
> dyld: loaded: /opt/local/libexec/qt4-mac/plugins/sqldrivers/
> libqsqlpsql.bundle
> dyld: loaded: /opt/local/lib/postgresql83/libpq.5.dylib
> dyld: loaded: /opt/local/libexec/qt4-mac/lib/QtSql.framework/
> Versions/4/QtSql
> dyld: loaded: /opt/local/libexec/qt4-mac/lib/QtCore.framework/
> Versions/4/QtCore
> dyld: loaded: /opt/local/lib/libz.1.dylib
> dyld: loaded: /opt/local/lib/libssl.0.9.8.dylib
> dyld: loaded: /opt/local/lib/libcrypto.0.9.8.dylib
> QObject::moveToThread: Current thread (0x1d17d0) is not the object's
> thread (0x1a7820).
> Cannot move to target thread (0x1a7820)
>
>
> Suggestions?
>
> Thanks in advance!
> Scott
>
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
More information about the macports-users
mailing list