I am trying to make a form app and I don t understand the error:
TypeError: object.__init__() takes exactly one argument (the instance to initialize)
OK, so the error is actually not in your super(Grid1,self).__init__(**kwargs)
statement, it's in the creation of the Submit button. You did:
self.submit = Button(text="Submit", font=40)
self.add_widget(self.submit)
But as the docs say, the font size is set by font_size
and not font
. The code should be:
self.submit = Button(text="Submit", font_size=40)
self.add_widget(self.submit)
This should work just fine.
Just want to thank @chepner for pointing this out:
Note that the issue, then, is that font, not being recognized by Button (or anyone else), is simply passed on up the chain until it is ultimately passed to
object.__init__
(which raises an error instead of simply ignoring unexpected arguments).