Trying to build a GUI in Python at the moment, and I\'m stuck at this part in particular. Every time I try to run my code it just throws the error TypeError: __init__(
super().__init__(self, master = master, **kwargs)
If you're using super()
, you don't need to specify self
explicitly.
You are getting that error because self
is being interpreted as the argument for master
. So it's like if you were calling __init__(master=self, master=master, **kwargs)
.
The issue is in the following line in Plotter.__init__()
-
super().__init__(self, master = master, **kwargs)
When calling the parent's __init__
method, you do not need to pass the self
argument, when you do that, it is getting treated as the master
argument for the parent, and then when you try to pass master
as master=master
, it causes your error.
You should simply do -
super().__init__(master = master, **kwargs)