PyQt5 script received BEX error in StackHash module

I wrote a script in Python 3.5 using PyQt5 and 2 of my colleagues could not run it - they got an error:

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 the script executes the first Qt function:

app = QtWidgets.QApplication(sys.argv)
+1
source share
1 answer

Unfortunately, I have no errors on my PC, so I could not reproduce. But my colleague found a solution. He needs to clear the import. I originally imported 2 similar packages:

from PyQt5.QtGui import QTextCursor, QFont
from PyQt5.Qt import QTextCursor, QFont

And the problem was fixed when my colleague commented on the second line:

from PyQt5.QtGui import QTextCursor, QFont
#from PyQt5.Qt import QTextCursor, QFont

So, if you ever received a message about a similar error, try clearing your import ...

0
source

Source: https://habr.com/ru/post/1674596/


All Articles