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
So, if you ever received a message about a similar error, try clearing your import ...
source
share