Closed hugoliv closed 9 years ago
It looks like you may have altered Client.__init__
in such a way that it no longer works. Can we see your class definition? You most likely just have to accept **kwargs
and pass it through to Object.__init__
to fix the issue.
Ha ha, here is my class:
class Client(Object):
pass
def __init__(self, name):
self.name = name
yep, that'll do it. You're not calling Object's constructor with the kwargs. Try this:
class Client(Object):
def __init__(self, **kwargs):
if 'name' not in kwargs:
raise TypeError('Name is required')
super(Client, self).__init__(**kwargs)
Then create them with Client(name="myname")
. Of course, if name is not actually required, just leave out __init__
completely.
Ha ! That does the trick ! Thank you !
Hello,
I don't know why this line seems to not working:
With this error: