M
M
Maxim Yumikov2021-05-03 03:07:31
Python
Maxim Yumikov, 2021-05-03 03:07:31

Error when trying to exclude a member by a bot?

Good day, Habr! I ran into a problem that when I call a method, this error pops up and I don’t understand where it came from
PS I’m a teapot, yes.
Error - __call__() takes 1 positional argument but 3 were given

elif m["text"].lower() == 'кик':
            	id_bes = m["peer_id"]        
            	chat_id = id_bes-2000000000            	    
            	vk.method("messages.removeChatUser",	
            	{"chat_id":chat_id,
            	"user_id":#тут любой айди участника беседы
            	 })

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
egorttt_youtube, 2021-05-04
@egorttt_youtube

It might help __call__() takes 1 positional argument but 3 were given how to solve?
And if you look at the error itself, then the translation will be as follows

Call __() takes 1 positional argument but was given 3

You gave too many arguments, look at how many this or that function should take (xs how to call it differently), try to freeze the code if you can’t find an error

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question