[PyQt] Crash when scanning for other packages (pyqtdeploy 1.2.1)

Phil Thompson phil at riverbankcomputing.com
Fri Apr 15 10:16:51 BST 2016


On 14 Apr 2016, at 9:22 pm, Christopher.Cox at gov.yk.ca wrote:
> 
> Hi,
> 
> I've run into some problems with including other Python packages in pyqtdeploy projects recently (under OSX 10.11.4 64-bit, with Python 3.5.1, Qt/PyQt 5.5.1, and sip 4.18 all statically compiled and installed in an osx-64 sysroot, testing with both pyqtdeploy 1.2.1 and the current development version in the Mercurial repository).
> 
> When I'm in the 'Other Packages' tab in the pyqtdeploy GUI and click on the 'Scan' button to populate the 'Packages Directory' pane, pyqtdeploy crashes with the following traceback messages:
> 
> Traceback (most recent call last):
>  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pyqtdeploy/gui/qrc_package_editor.py", line 230, in _scan
>    root = self.get_root_dir()
>  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pyqtdeploy/gui/other_packages_page.py", line 195, in get_root_dir
>    return project.path_from_user(package.name)
>  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pyqtdeploy/project/project.py", line 136, in path_from_user
>    fi = self._fileinfo_from_user(user_path)
>  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pyqtdeploy/project/project.py", line 187, in _fileinfo_from_user
>    fi = QFileInfo(self.expandvars(user_path.strip()))
> AttributeError: 'NoneType' object has no attribute 'strip'
> 
> At least on my development machine, the same crash happens even with the current development version of pyqtdeploy from the Mercurial repo.  Running pyqtdeploy on 'pyqtdeploy.pdy', selecting the 'Other Packages' tab, and hitting 'Scan' causes pyqtdeploy to die with the same traceback.
> 
> For what it's worth, there are no problems using pyqtdeploy to package PyQt applications that don't rely on packages outside of the standard library -- as long as there aren't any references to outside libraries, pyqtdeploy works perfectly, and the binaries compile and run without a hitch.  Looking back through the mailing list archives, it looks like something similar was discussed back in February/March, though that might have been a separate issue:
> 
> https://www.riverbankcomputing.com/pipermail/pyqt/2016-February/036928.html
> https://www.riverbankcomputing.com/pipermail/pyqt/2016-March/037081.html
> 
> If anyone has any thoughts about how to deal with this, I'd be grateful to hear them.

That was fixed in v1.2.1 as far as I am aware. I can't reproduce the problem anyway. The current development version in the repo is v1.2.1 - there have been no commits since the release.

Phil



More information about the PyQt mailing list