[PyQt] pyqtdeployed app crashes on launch
Phil Thompson
phil at riverbankcomputing.com
Sun Jul 27 09:44:45 BST 2014
On 27/07/2014 12:27 am, Dave Gradwell wrote:
> Well I moved to PyQt5 but am back to my previous problem of imports
> failing in the pyqtdeployed application.
>
> My directory structure looks like this:
> /clientUtility-moving-to-pyqt5/
> /clientUtility-moving-to-pyqt5/clientUtility.py
> /clientUtility-moving-to-pyqt5/clientUtility_ui.py
> /clientUtility-moving-to-pyqt5/job_ui.py
> /clientUtility-moving-to-pyqt5/utilityMethods.py
>
> clientUtility.py is the 'main' script. It imports the other scripts
> with these unsurprising lines:
> import utilityMethods
> import clientUtility_ui
> import job_ui
>
> It works when started from the python interpreter but fails once
> pyqtdeployed. The pyqtdeploy log shows their inclusion:
> ...
> Freezing
> /Users/admin/Desktop/clientUtility-moving-to-pyqt5/clientUtility.py
> Freezing
> /Users/admin/Desktop/clientUtility-moving-to-pyqt5/clientUtility_ui.py
> Freezing /Users/admin/Desktop/clientUtility-moving-to-pyqt5/job_ui.py
> Freezing
> /Users/admin/Desktop/clientUtility-moving-to-pyqt5/utilityMethods.py
> ...
>
> But starting the pyqtdeployed app from the command line shows the
> problem:
> """
> admins-Mac:~ admin$
> /Users/admin/Desktop/clientUtility-moving-to-pyqt5/build/clientUtility.app/Contents/MacOS/clientUtility
> /Users/admin/Desktop/clientUtility-moving-to-pyqt5/build/clientUtility.app/Contents/MacOS/clientUtility:
> a Python exception occurred:
> Traceback (most recent call last):
> File "clientUtility.py", line 14, in <module>
> File "bootstrap.py", line 2237, in _find_and_load
> File "bootstrap.py", line 2224, in _find_and_load_unlocked
> ImportError: No module named 'utilityMethods'
> """
>
> I have tried 'from . import utilityMethods' but this line fails when
> started from the interpreter.
>
> Again I apologise for the 'low tech' question but any advice
> appreciated.
If your application is just the files you mention can you send me a copy
privately (with your .pdy file) and I'll take a proper look.
Phil
More information about the PyQt
mailing list