title: Python: NSInvalidArgumentException
body: <p>I get the below error when I try to run a plot function:</p>
  
  <pre><code>Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fb299cb3fc0'
  </code></pre>
  
  <p>I have checked out the other questions on this website but didn't find anything with <code>NSApplication _setup</code> error.</p>
  
  <p>Below is the code I'm using:</p>
  
  <pre class="lang-py prettyprint-override"><code>import easygui as gui
  import matplotlib.pyplot as plt
  def plots(plotLabel, XLabel, YLabel,XValues,YValues) :
     plt.xlabel(XLabel, fontsize=16)
     plt.ylabel(YLabel, fontsize=16)
     plt.suptitle(plotLabel, fontsize=20)
     plt.plot(XValues,YValues)
     plt.show()
  button=gui.buttonbox("ScatterPlot")
  </code></pre>