Python TypeError: __init__() got multiple values for argument 'master'

前端 未结 2 647
太阳男子
太阳男子 2021-01-19 16:42

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__(

2条回答
  •  抹茶落季
    2021-01-19 17:26

    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).

提交回复
热议问题