<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>That is extremely odd.</p>
<p><br>
</p>
<p>Site with tutorials: <a href="https://pythonspot.com/en/pyqt5/" class="OWAAutoLink" id="LPlnk865514" previewremoved="true">https://pythonspot.com/en/pyqt5/</a><br>
Menu code that causes error for me <a href="https://pythonspot.com/en/pyqt5-menu/" class="OWAAutoLink" id="LPlnk482602" previewremoved="true">https://pythonspot.com/en/pyqt5-menu/</a><br>
</p>
<div id="LPBorder_GT_14905558568340.7025038029137942" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_14905558568320.2733705825302566" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_14905558568330.06978902659263309" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_14905558568330.8102605280591344"></div>
<div id="LPTitle_14905558568330.24243086588784535" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14905558568330.8462167529740874" href="https://pythonspot.com/en/pyqt5/" target="_blank" style="text-decoration: none;">PyQT5 – Python Tutorial</a></div>
<div id="LPMetadata_14905558568330.8864540214841465" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
pythonspot.com</div>
<div id="LPDescription_14905558568340.6611972607316958" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
PyQt5 is a module that can be used to create graphical user interfaces (GUI). PyQt5 is not backwards compatible with PyQt4. You will need Python 2.6+ or newer.</div>
</td>
</tr>
</tbody>
</table>
</div>
I am on a Mac 10.12.3<br>
Python 3.6
<p></p>
<div><br>
</div>
The file partially works in terminal but not in PyCharm. The only menu bar items I receive are  "python3" and "edit" though. They load extremely slowly and I am on a really good laptop.
<div>Screenshots attached.<br>
<div><br>
<div>How many menu bar items do you receive ?</div>
<div>No view, tools, search, or help menu bar items, like the program seems to supposedly create.</div>
<div><br>
</div>
<div>I do not know why I am not receiving all of the menu bar items.<br>
<br>
In PyCharm the full error I receive is <a href="http://pastebin.com/RJ3gnrAT" class="OWAAutoLink" id="LPlnk136734" previewremoved="true">http://pastebin.com/RJ3gnrAT</a></div>
<div id="LPBorder_GT_14905556915640.026633137462332535" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_14905556915610.2512137335813833" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="ImageCell_14905556915620.45661880606089" colspan="1" style="width: 250px; position: relative; display: table-cell; padding-right: 20px;">
<div id="LPImageContainer_14905556915620.3578158883545095" style="background-color: rgb(255, 255, 255); height: 250px; position: relative; margin: auto; display: table; width: 250px;">
<a id="LPImageAnchor_14905556915620.7513514414735187" href="http://pastebin.com/RJ3gnrAT" target="_blank" style="display: table-cell; text-align: center;"><img aria-label="Preview image with link selected. Double-tap to open the link." id="LPThumbnailImageID_14905556915620.18384012432091779" width="250" height="250" style="display: inline-block; max-width: 250px; max-height: 250px; height: 250px; width: 250px; border-width: 0px; vertical-align: bottom;" src="http://pastebin.com/i/facebook.png"></a></div>
</td>
<td id="TextCell_14905556915630.7679616588952209" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_14905556915630.8223285960389648"></div>
<div id="LPTitle_14905556915630.5885875927716291" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14905556915630.5270177408890231" href="http://pastebin.com/RJ3gnrAT" target="_blank" style="text-decoration: none;">Process: Python [9764] Path: /usr/local/Cellar/p - Pastebin.com</a></div>
<div id="LPMetadata_14905556915630.7741633743554606" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
pastebin.com</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<div>Additionally have you tried running this program in one of your IDEs without errors?</div>
<div><br>
</div>
<div>Thanks a bunch,</div>
<div><br>
Grant</div>
<div><br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block; width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Barry Scott <barry@barrys-emacs.org><br>
<b>Sent:</b> Sunday, March 26, 2017 7:41 AM<br>
<b>To:</b> Grant Fraser<br>
<b>Cc:</b> pyqt@riverbankcomputing.com<br>
<b>Subject:</b> Re: [PyQt] com.apple.xbs Error-- Please help- Thank you</font>
<div> </div>
</div>
<div><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 25 Mar 2017, at 17:25, Grant Fraser <<a href="mailto:grantrf93@hotmail.com" class="">grantrf93@hotmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div id="divtagdefaultwrapper" dir="ltr" class="" style="font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px; font-size:12pt; font-family:Calibri,Arial,Helvetica,sans-serif">
<p class="" style="margin-top:0px; margin-bottom:0px"></p>
<div class="" style="margin:0px 0px 0.357143em; padding:0px; font-size:14px; line-height:1.42857em; color:rgb(34,34,34); font-family:verdana,arial,helvetica,sans-serif">
Mac OS Python 3 PyQt5</div>
<div class="" style="margin:0px 0px 0.357143em; padding:0px; font-size:14px; line-height:1.42857em; color:rgb(34,34,34); font-family:verdana,arial,helvetica,sans-serif">
Program that causes error from tutorial but 'works' for the site owner (<a href="http://zetcode.com/gui/pyqt5/menustoolbars/" class="OWAAutoLink" id="LPlnk245749" previewremoved="true">http://zetcode.com/gui/pyqt5/menustoolbars/</a>):</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>I ran the code in your email and it works error free.</div>
<div><br class="">
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>macOs 10.12.3</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>python 3.5.2 and 3.6.0 with PyQt5 5.7 and 5.8.1</div>
<div><br class="">
</div>
<div>What versions are you using?</div>
<div><br class="">
</div>
<div>I put your code into file a.py and run it from the command line as:</div>
<div><br class="">
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>$ python3.6 a.py</div>
<div><br class="">
</div>
<div>Note: that this example bumps into macOS specific handling of menus.</div>
<div><br class="">
</div>
<div>The File>Exit menu is automatically moved to the Python menu as Quit with Cmd-Q as the short cut the icon does show up.</div>
<div><br class="">
</div>
<div>Barry</div>
<div class=""><br class="">
</div>
<blockquote type="cite" class="">
<div class="">
<div id="divtagdefaultwrapper" dir="ltr" class="" style="font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px; font-size:12pt; font-family:Calibri,Arial,Helvetica,sans-serif">
<div id="LPBorder_GT_14904625682230.5789634353815705" class="" style="margin-bottom:20px; overflow:auto; width:2075px; text-indent:0px">
<table id="LPContainer_14904625682210.6394801620665909" cellspacing="0" class="" style="width:1867.5px; background-color:rgb(255,255,255); overflow:auto; padding-top:20px; padding-bottom:20px; margin-top:20px; border-top-width:1px; border-top-style:dotted; border-top-color:rgb(200,200,200); border-bottom-width:1px; border-bottom-style:dotted; border-bottom-color:rgb(200,200,200)">
<tbody class="">
<tr valign="top" class="" style="border-spacing:0px">
<td id="TextCell_14904625682220.21805416462880256" colspan="2" class="" style="vertical-align: top; padding: 0px; display: table-cell; position: relative;">
<div id="LPRemovePreviewContainer_14904625682220.31439469499314665" class=""></div>
<div id="LPTitle_14904625682220.7032952214150816" class="" style="top:0px; color:rgb(0,120,215); font-weight:normal; font-size:21px; font-family:wf_segoe-ui_light,'Segoe UI Light','Segoe WP Light','Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; line-height:21px">
<a id="LPUrlAnchor_14904625682220.5164088187193381" href="http://zetcode.com/gui/pyqt5/menustoolbars/" target="_blank" class="" style="text-decoration:none">Menus and toolbars in PyQt5 - ZetCode</a></div>
<div id="LPMetadata_14904625682220.160844406479568" class="" style="margin:10px 0px 16px; color:rgb(102,102,102); font-weight:normal; font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:14px; line-height:14px">
<a href="http://zetcode.com/" class="">zetcode.com</a></div>
<div id="LPDescription_14904625682230.4296130138219205" class="" style="display:block; color:rgb(102,102,102); font-weight:normal; font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:14px; line-height:20px; max-height:100px; overflow:hidden">
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.</div>
</td>
</tr>
</tbody>
</table>
</div>
<br class="">
<pre class="" style="margin-top:0.357143em; margin-bottom:0.357143em; padding:4px 9px; border:1px solid rgb(230,230,222); border-top-left-radius:2px; border-top-right-radius:2px; border-bottom-right-radius:2px; border-bottom-left-radius:2px; overflow:auto; color:rgb(34,34,34)"><code class="" style="font-family:monospace,monospace; margin:0px 2px; border:0px; background-color:transparent; border-top-left-radius:2px; border-top-right-radius:2px; border-bottom-right-radius:2px; border-bottom-left-radius:2px; word-break:normal; display:block; font-size:1em; line-height:1.42857em; padding:0px!important">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_())
</code></pre>
<div class="" style="margin:0.357143em 0px; padding:0px; font-size:14px; line-height:1.42857em; color:rgb(34,34,34); font-family:verdana,arial,helvetica,sans-serif">
Error:</div>
<pre class="" style="margin-top:0.357143em; margin-bottom:0.357143em; padding:4px 9px; border:1px solid rgb(230,230,222); border-top-left-radius:2px; border-top-right-radius:2px; border-bottom-right-radius:2px; border-bottom-left-radius:2px; overflow:auto; color:rgb(34,34,34)"><code class="" style="font-family:monospace,monospace; margin:0px 2px; border:0px; background-color:transparent; border-top-left-radius:2px; border-top-right-radius:2px; border-bottom-right-radius:2px; border-bottom-left-radius:2px; word-break:normal; display:block; font-size:1em; line-height:1.42857em; padding:0px!important">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'  
</code></pre>
<div class="" style="margin:0.357143em 0px; padding:0px; font-size:14px; line-height:1.42857em; color:rgb(34,34,34); font-family:verdana,arial,helvetica,sans-serif">
*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.</div>
<div class="" style="margin:0.357143em 0px; padding:0px; font-size:14px; line-height:1.42857em; color:rgb(34,34,34); font-family:verdana,arial,helvetica,sans-serif">
*I have even checked hidden folders.</div>
<div class="" style="margin:0.357143em 0px 0px; padding:0px; font-size:14px; line-height:1.42857em; color:rgb(34,34,34); font-family:verdana,arial,helvetica,sans-serif">
*Perhaps you could try running it yourself and seeing if you get the same error. I would really appreciate any help. Thank you.</div>
<br class="">
<p class="" style="margin-top:0px; margin-bottom:0px"></p>
</div>
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px; float:none; display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px; float:none; display:inline!important">PyQt
 mailing list    </span><a href="mailto:PyQt@riverbankcomputing.com" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">PyQt@riverbankcomputing.com</a><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">
<a href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>