TypeError: takes exactly 1 argument (2 given) TypeError: takes exactly 1 argument (2 given) tkinter tkinter

TypeError: takes exactly 1 argument (2 given)


The function you pass to .bind() takes the event as an argument, and it will be passed in regardless of whether you need it.

Change the function definition to

def CheckUser(self, event):    self.labelUserVar.set("unavailable user name!")


This:

server.bind((host,port))

Not this:

server.bind(host,port)

Bind the address (host, port) to the socket. Under AF_INET, the address is expressed in the form of a tuple (host, port).