Trying to start an instance of ShowBase

Hi All,

I’m trying to start a simple instance of ShowBase, but I keep getting the same error message:
“if ‘base’ in builtins.dict:
raise StandardError, “Attempt to spawn multiple ShowBase instances!””

Here is the the code that I have so far:

from direct.showbase.ShowBase import ShowBase

class myApp(ShowBase):
    
    def __init__(self):
        ShowBase.__init__(self)
        
        
app = myApp()
app.run()

What am I missing here? All I want to do is set up a simple 3d environment that I can start putting 3d assets into for animation. When I start building an app I like to build the structure first then start adding function to it, but for some reason I can’t get that even started.

Thanks in advance for any help that can be provided

That exact code works for me. Is there any other code that you have around that? Perhaps you accidentally have an import of DirectStart in the same file, or are creating another instance of ShowBase in another module you have?