[PyQt] pyqtdeploy android app crashing at import main module

bootch at nc.rr.com bootch at nc.rr.com
Mon Sep 1 23:17:22 BST 2014


Trying to pyqtdeploy a hello_world example app (that runs in Python on Linux) to android API 14 deploying to real hardware.

I harnessed pyqtdeploy_start.cpp.  At 'if (PyImport_ImportFrozenModule(CONST_CAST(main_module)) < 0)' is true and it calls py_error and quits.  I think -1 that means it found the module but threw an exception while initializing it.  As far as I can determine the exception is a BaseException (that seems strange.)  

I don't understand the code sets the filename for the module ":/__main__.pyo".  I thought the colon notation was a Qt concept ( but I suppose qrcimporter must understand it.)  I can't find that file in the Qt Creator project anywhere, not in Resources.  I suppose it was found and I should harness the initialization somehow.

(I harnessed by calling qWarning() (instead of fprintf(stderr)), which logs to android logcat.  I think stdout/stderr don't work on Android unless the app redirects them to a file, early.  Neither does PyErr_Print() seem to make the error visible.)

?


More information about the PyQt mailing list