[英]PyQt5 script got error BEX in module StackHash
I wrote script in Python 3.5 using PyQt5 and 2 my colleagues could not run it - they got error: 我使用PyQt5在Python 3.5中编写脚本,2我的同事无法运行它 - 他们得到错误:
Problem signature:
Problem Event Name: BEX
Application Name: python.exe
Application Version: 3.5.1150.1013
Application Timestamp: 566391f0
Fault Module Name: StackHash_0a9e
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Offset: 00000000
Exception Code: c0000005
Exception Data: 00000008
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 1029
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
When script executed first Qt function: 当脚本执行第一个Qt函数时:
app = QtWidgets.QApplication(sys.argv)
Unfortunately I do not have error on my PC so I could not reproduce. 不幸的是我的PC上没有错误,所以我无法重现。 But my colleague found a solution.
但我的同事找到了解决方案。 He need to clean up imports.
他需要清理进口。 Originally I imported 2 similar packages:
最初我导入了2个类似的包:
from PyQt5.QtGui import QTextCursor, QFont
from PyQt5.Qt import QTextCursor, QFont
And issue was fixed when my colleague commented second line: 当我的同事评论第二行时,问题就解决了:
from PyQt5.QtGui import QTextCursor, QFont
#from PyQt5.Qt import QTextCursor, QFont
So if ever you got report of similar error try to clean up your imports... 因此,如果您有类似错误的报告尝试清理您的导入...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.