Compiling ShowBase error on Mac OSX

Hi everyone. I’m a beginner with Panda3D.
I tried to do the “hello world” program but I have a problem. I’m using python on Mac OSX Snow Leopard.
When I compile this code:

from direct.showbase.ShowBase import ShowBase

class MyApp(ShowBase):

  def __init__(self):
    ShowBase.__init__(self)

app = MyApp()
app.run

I find this error in the terminal:

macbook-di-vincenzo-giuffrida:~ vikyg13$ /var/folders/eT/eTj0tVHTEwGJWm+q+S4Nrk+++TI/Cleanup\ At\ Startup/hello_world-323604310.115.py.command ; exit;
Known pipe types:
osxGraphicsPipe
(all display modules loaded.)
Mon Apr 4 12:05:11 macbook-di-vincenzo-giuffrida.local python[1571] : kCGErrorIllegalArgument: CGSCopyRegion : Null pointer
Mon Apr 4 12:05:11 macbook-di-vincenzo-giuffrida.local python[1571] : kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Mon Apr 4 12:05:11 macbook-di-vincenzo-giuffrida.local python[1571] : kCGErrorIllegalArgument: _CGSFindSharedWindow: WID 421
Mon Apr 4 12:05:11 macbook-di-vincenzo-giuffrida.local python[1571] : kCGErrorIllegalArgument: CGSRemoveSurface: Invalid window 0x1a5
logout

If I use this code:

import direct.directbase.DirectStart

run()

everything is ok and I see the grey window.
How can I solve the problem?
I use Panda 1.6.x vers.
Thank you!

Welcome to the forums!

Your code has “app.run”, not “app.run()” as it should be.

Thank you!! now it works

very stupid error :blush:

I made the exact same mistake, so you’re not alone :slight_smile: