title: PYGAME: ERROR: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1000) creating CGSWindow on line 259
body: <p>This is my first post on stack overflow. I have been trying to run a pygame code on my MAC Mountain Lion, and after installing pygame successfully when I try to <code>set_mode</code> for the display using the command</p>
  <pre class="lang-py prettyprint-override"><code>pygame.display.set_mode([700,400])
  </code></pre>
  <p>I get the following error</p>
  <pre><code>2013-12-19 18:31:12.299 Python[25975:f0b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1000) creating CGSWindow on line 259'
  *** First throw call stack:
  (
      0   CoreFoundation                      0x00007fff86c7bb06 __exceptionPreprocess + 198
      1   libobjc.A.dylib                     0x00007fff8aab93f0 objc_exception_throw + 43
      2   CoreFoundation                      0x00007fff86c7b8dc +[NSException raise:format:] + 204
      3   AppKit                              0x00007fff88231b49 _NSCreateWindowWithOpaqueShape2 + 655
      4   AppKit                              0x00007fff88230340 -[NSWindow _commonAwake] + 2002
      5   AppKit                              0x00007fff881eed82 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 1763
      6   AppKit                              0x00007fff881edecf -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1568
      7   AppKit                              0x00007fff881ed89f -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
      8   libSDL-1.2.0.dylib                  0x000000010054b9cd -[SDL_QuartzWindow initWithContentRect:styleMask:backing:defer:] + 265
      9   libSDL-1.2.0.dylib                  0x000000010054943d QZ_SetVideoMode + 1423
      10  libSDL-1.2.0.dylib                  0x000000010054069c SDL_SetVideoMode + 936
      11  display.so                          0x00000001005c330f set_mode + 271
      12  Python                              0x00000001000c277d PyEval_EvalFrameEx + 21405
      13  Python                              0x00000001000c4786 PyEval_EvalCodeEx + 2118
      14  Python                              0x00000001000c48a6 PyEval_EvalCode + 54
      15  Python                              0x00000001000e912e PyRun_FileExFlags + 174
      16  Python                              0x00000001000e93ca PyRun_SimpleFileExFlags + 458
      17  Python                              0x000000010010044d Py_Main + 3101
      18  Python                              0x0000000100000f14 Python + 3860
  )
  libc++abi.dylib: terminate called throwing an exception
  [Finished in 1.9s with exit code -6]
  [shell_cmd: python -u &quot;/Users/krutirag/Documents/Coding/Python/GameDev/Main.py&quot;]
  [dir: /Users/krutirag/Documents/Coding/Python/GameDev]
  [path: /usr/bin:/bin:/usr/sbin:/sbin]
  </code></pre>
  <p>I installed both python and pygame using brew. I searched extensively for solutions but did not get anything useful for this error. Appreciate any suggestion or help with this. (I found a similar question in stackOverflow , but I could not comment on that since I am new to the forum and do not have the points for it)</p>