TypeError: __init__() takes exactly 1 positional argument (2 given)

Chris Rebert clp2 at rebertia.com
Mon May 16 00:10:06 EDT 2011


On Sun, May 15, 2011 at 8:53 PM, Gnarlodious <gnarlodious at gmail.com> wrote:
> Can someone please explain what I am doing wrong?
>
> Calling script:
>
> from Gnomon import GnomonBase
> Gnomon=GnomonBase(3)
>
>
> Called script:
>
> class GnomonBase(object):
>    def __init__(self, bench):
>        # do stuff
>
> But all I get is:
> TypeError: __init__() takes exactly 1 positional argument (2 given)
>
> I don't understand, I am only sending one variable. What does it think
> I am sending two?

Please post the *full* exception Traceback.

Cheers,
Chris



More information about the Python-list mailing list