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

Gnarlodious gnarlodious at gmail.com
Sun May 15 23:53:31 EDT 2011


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?

This is Python 3.1.3.

-- Gnarlie



More information about the Python-list mailing list