Charlie
0
Q:

takes 1 positional argument but 2 were given python

#Positional arguments are the amount of arguments passed through a function
#For example

def function(value1, value2):
	print(value1)
	print(value2)

function("value1","value2","value3")
1
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/#:~:text=Conclusion,the%20methods%20in%20a%20class.
0
0

New to Communities?

Join the community