__init__() takes 1 positional argument but 2 were given code example
Example 1: 1 positional arguments expected but 2 were given
class thing(object):
def __init__(self):
pass
def function(self)
print("hello")
thingy = thing()
thingy.bind("<KeyPress>", thingy.function)
Example 2: takes 1 positional argument but 2 were given python
This error is often caused by the fact that the self is omitted as a parameter in the method of the class.
https://careerkarma.com/blog/python-takes-one-positional-argument-but-two-were-given/
0
Example 3: 2 positional arguments but 3 were given
def function(value1, value2):
print(value1)
print(value2)
function("value1","value2","value3")