<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div>Hello,<div><br></div><div>Pardon the cross-post and tangential subject matter. &nbsp;My PyQt-QPSQL app dies on OSX, yielding the following error: &nbsp;"Cannot move to target thread." &nbsp;Linux and Windows builds behave properly. &nbsp;I've rebuilt my macports environment from scratch, googled myself silly, and poked and prodded my environment for several weeks. &nbsp;If someone here has any insight to offer on how I can rectify the problem, I'd be grateful.</div><div><br></div><div>I've traced the problem to a py2app options include of PyQt4.QtSql. &nbsp;My app requires QPSQL, though tests with QSQLITE also yield the same error.&nbsp;</div><div><br>Setting the DYLD_PRINT_LIBRARIES env var, yields the following output on app launch:<br><br></div><div>...<br>Qt Version: &nbsp;&nbsp;&nbsp;4.5.2<br>PyQt Version: &nbsp;4.5.4<br>dyld: loaded: /opt/local/libexec/qt4-mac/plugins/sqldrivers/libqsqlpsql.bundle<br>dyld: loaded: /opt/local/lib/postgresql83/libpq.5.dylib<br>dyld: loaded: /opt/local/libexec/qt4-mac/lib/QtSql.framework/Versions/4/QtSql<br>dyld: loaded: /opt/local/libexec/qt4-mac/lib/QtCore.framework/Versions/4/QtCore<br>dyld: loaded: /opt/local/lib/libz.1.dylib<br>dyld: loaded: /opt/local/lib/libssl.0.9.8.dylib<br>dyld: loaded: /opt/local/lib/libcrypto.0.9.8.dylib<br>QObject::moveToThread: Current thread (0x1da760) is not the object's thread (0x1b1b10).<br>Cannot move to target thread (0x1b1b10)<br><br>On Mac OS X, you might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.</div><div>...<br><br><br></div><div><br>My macports environment looks like this:<br><br>...<br>&nbsp;postgresql83 @8.3.1_0 (active)<br>...<br>&nbsp;py26-altgraph @0.6.7_0 (active)<br>&nbsp;py26-bdist_mpkg @0.4.4_0 (active)<br>&nbsp;py26-macholib @1.2_0 (active)<br>&nbsp;py26-modulegraph-devel @0.7.2_0 (active)<br>&nbsp;py26-py2app-devel @0.4.2_1 (active)<br>&nbsp;py26-pyqt4 @4.5.4_0 (active)<br>&nbsp;py26-setuptools @0.6c9_0 (active)<br>&nbsp;py26-sip @4.8.2_0 (active)<br>...<br>&nbsp;qt4-mac @4.5.2_1+psql (active)<br>...<br><br><br>Any thoughts or suggestions?<br><br>Thanks!<br>Scott<br><br><font class="Apple-style-span" color="#144FAE"><font class="Apple-style-span" color="#000000"><br></font></font></div></body></html>