pyInstaller:qwebkit在用pyins打包pyside gui时无法加载图片和乱码文本

2024-10-16 20:49:38 发布

您现在位置:Python中文网/ 问答频道 /正文

当我在本地环境中运行时,我的程序运行得很好。 但是在用pyinstaller打包后它出错了。我尝试了this,但是也失败了。 这是pyinstaller的输出:

454 INFO: Testing for ability to set icons, version resources...
581 INFO: ... resource update available
592 INFO: UPX is not available.
710 INFO: Processing hook hook-os
983 INFO: Processing hook hook-time
989 INFO: Processing hook hook-cPickle
1219 INFO: Processing hook hook-_sre
1597 INFO: Processing hook hook-cStringIO
1953 INFO: Processing hook hook-encodings
1969 INFO: Processing hook hook-codecs
3881 INFO: Extending PYTHONPATH with C:\Users\mark\VitualEnvimnt\env2\app
5634 INFO: checking Analysis
5634 INFO: building Analysis because out00-Analysis.toc non existent
5634 INFO: running Analysis out00-Analysis.toc
5634 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable
32148 INFO: Searching for assembly amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none ...
32148 INFO: Found manifest C:\Windows\WinSxS\Manifests\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022. 8_none_750b37ff97f4f68b.manifest
32197 INFO: Searching for file msvcr90.dll
32197 INFO: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.   8_none_750b37ff97f4f68b\msvcr90.dll
32197 INFO: Searching for file msvcp90.dll
32197 INFO: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.   8_none_750b37ff97f4f68b\msvcp90.dll
32197 INFO: Searching for file msvcm90.dll
32197 INFO: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.   8_none_750b37ff97f4f68b\msvcm90.dll
32769 INFO: Analyzing C:\Users\mark\VitualEnvimnt\env2\lib\site-packages\pyinstaller-2.1-py2.7. egg\PyInstaller\loader\_pyi_bootstrap.py
32815 INFO: Processing hook hook-os
32871 INFO: Processing hook hook-site
32911 INFO: Processing hook hook-encodings
33105 INFO: Processing hook hook-time
33112 INFO: Processing hook hook-cPickle
33217 INFO: Processing hook hook-_sre
33437 INFO: Processing hook hook-cStringIO
33588 INFO: Processing hook hook-codecs
34237 INFO: Processing hook hook-pydoc
34664 INFO: Processing hook hook-email
34838 INFO: Processing hook hook-httplib
34979 INFO: Processing hook hook-email.message
35224 INFO: Analyzing C:\Users\mark\VitualEnvimnt\env2\lib\site-packages\pyinstaller-2.1-py2.7. egg\PyInstaller\loader\pyi_importers.py
35311 INFO: Analyzing C:\Users\mark\VitualEnvimnt\env2\lib\site-packages\pyinstaller-2.1-py2.7. egg\PyInstaller\loader\pyi_archive.py
35411 INFO: Analyzing C:\Users\mark\VitualEnvimnt\env2\lib\site-packages\pyinstaller-2.1-py2.7. egg\PyInstaller\loader\pyi_carchive.py
35512 INFO: Analyzing C:\Users\mark\VitualEnvimnt\env2\lib\site-packages\pyinstaller-2.1-py2.7. egg\PyInstaller\loader\pyi_os_path.py
35532 INFO: Analyzing application.py
35686 INFO: Processing hook hook-PySide
36036 INFO: Processing hook hook-jinja2
36601 INFO: Processing hook hook-distutils
36694 INFO: Processing hook hook-parser
36832 INFO: Processing hook hook-sysconfig
37260 INFO: Processing hook hook-xml
37753 INFO: Processing hook hook-xml.sax
37877 INFO: Processing hook hook-pyexpat
38052 INFO: Processing hook hook-lxml.etree
38500 INFO: Processing hook hook-sqlite3
39053 INFO: Processing hook hook-xml.etree.cElementTree
39085 INFO: Processing hook hook-_elementtree
39703 INFO: Hidden import 'codecs' has been found otherwise
39703 INFO: Hidden import 'encodings' has been found otherwise
39703 INFO: Looking for run-time hooks
39704 INFO: Analyzing rthook C:\Users\mark\VitualEnvimnt\env2\lib\site-packages\pyinstaller-2.1-py2.7.  egg\PyInstaller\loader\rthooks\pyi_rth_pkgres.py
57420 INFO: Using Python library C:\Windows\system32\python27.dll
57618 INFO: Warnings written to C:\Users\mark\VitualEnvimnt\env2\app\build\application\warnapplication.txt
57634 INFO: checking PYZ
57634 INFO: rebuilding out00-PYZ.toc because out00-PYZ.pyz is missing
57634 INFO: building PYZ (ZlibArchive) out00-PYZ.toc
64128 INFO: checking PKG
64128 INFO: rebuilding out00-PKG.toc because out00-PKG.pkg is missing
64128 INFO: building PKG (CArchive) out00-PKG.pkg
64177 INFO: checking EXE
64178 INFO: rebuilding out00-EXE.toc because application.exe missing
64178 INFO: building EXE from out00-EXE.toc
64239 INFO: Appending archive to EXE C:\Users\mark\VitualEnvimnt\env2\app\build\application\application.exe
64244 INFO: checking COLLECT
64246 INFO: building COLLECT out00-COLLECT.toc

在输出文件夹dist中,我运行了输出exe文件application.exe,但是当使用pyinstaller打包pyside gui时,qtwebkit无法在编码不是utf-8的网页中加载图片和显示乱码文本。我不知道发生了什么。我尝试了this,但也失败了。在


Tags: pyinfoforsitehookusersdllmark