newbie problem with Creating a New Panda3D Application

Hi,

Just found Panda3D and installed it (Windows XP SP2) and tried the “Creating a New Panda3D Application” from the manual. For both suggested scripts I get the error message " module.init() takes at most 2 arguments(3 given)".

I don’t have any other version of Python installed. Am I missing something?

Ohmic

Is it possible that you typed:

from direct.showbase import ShowBase

instead of:

from direct.showbase.ShowBase import ShowBase

?

Welcome to the Panda3D forums!

That error message means you’ve given the init function too many arguments, which probably means you made a little mistake somewhere. Could you post the entire code you used, copy-pasted from your IDE? Even if drwr’s suggestion isn’t it, I’m sure we’ll find the problem soon enough. I know typos slip in on me all the time.

I didn’t actually type the code in - it was a copy and paste from the user manual itself:

from direct.showbase.ShowBase import ShowBase

class MyApp(ShowBase):

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

app = MyApp()
app.run()

I get the same error if I do (also from the manual):

import direct.directbase.DirectStart

run()

aagh - all is well, I was updating the wrong python file :slight_smile:

Now I really feel like a newbie…

hehe^ well glad it worked out.
since python heavily relies on indentation (and the forum happily ignores them)… next time you paste code please use the [code ] tags. those will preseve all whitespaces :slight_smile: