[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] pyqtdeployed app crashes on launch
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2014-07-27 8:44:45
Message-ID: 48467875bbf2f7aad88e93dba7b37c85 () www ! riverbankcomputing ! com
[Download RAW message or body]
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
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic