PyQt/PySide's qwindows.dll qwindowsvistastyle.dll is corrupted by UPX

Gamesun's Blog / 2023-08-29 / 原文

Windows 10 64-bits
Python 3.8.10 64-bits
PySide2 5.15.2
PyInstaller 4.3
UPX 4.1.0

it raises:

"This application failed to start because no Qt platform plugin could be initialize"

Solution
in spec files, add
upx_exclude=['qwindows.dll', 'qwindowsvistastyle.dll'],