[PyQt] com.apple.xbs Error-- Please help- Thank you
Grant Fraser
grantrf93 at hotmail.com
Sat Mar 25 17:25:58 GMT 2017
Mac OS Python 3 PyQt5
Program that causes error from tutorial but 'works' for the site owner (http://zetcode.com/gui/pyqt5/menustoolbars/):
Menus and toolbars in PyQt5 - ZetCode<http://zetcode.com/gui/pyqt5/menustoolbars/>
zetcode.com
Menus and toolbars in PyQt5. In this part of the PyQt5 tutorial, we will create menus and toolbars. A menu is a group of commands located in a menubar.
import sys
from PyQt5.QtWidgets import QMainWindow, QAction, qApp, QApplication
from PyQt5.QtGui import QIcon
class Example(QMainWindow):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
exitAction = QAction(QIcon('exit.png'), '&Exit', self)
exitAction.setShortcut('Ctrl+Q')
exitAction.setStatusTip('Exit application')
exitAction.triggered.connect(qApp.quit)
self.statusBar()
menubar = self.menuBar()
fileMenu = menubar.addMenu('&File')
fileMenu.addAction(exitAction)
self.setGeometry(300, 300, 300, 200)
self.setWindowTitle('Menubar')
self.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())
Error:
2017-03-23 23:25:08.606 Python[96170:2827344] *** Assertion failure in -[NSBitmapImageRep initWithCGImage:], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1504.81.100/AppKit.subproj/NSBitmapImageRep.m:1296
2017-03-23 23:25:08.608 Python[96170:2827344] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: cgImage != NULL'
*I have looked everywhere for this com.apple.xbs folder, including other computers. I cannot find it anywhere on other computers or online. What is the issue? Apparently it is only for developers? I have signed up as a developer and still cannot find it. I do not see the correlation between apple and this PyQt5 program though. I also do not see anywhere in the code that would mention needing this folder.
*I have even checked hidden folders.
*Perhaps you could try running it yourself and seeing if you get the same error. I would really appreciate any help. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170325/78c68b84/attachment.html>
More information about the PyQt
mailing list