programm is working perfectly before defining the function problem is that it is not getting the value from the user input and showing it to me and then error is coming too.
from tkinter import *
from tkinter import ttk
root = Tk()
root.title("Social Network - Login")
frame = ttk.Frame(root) #define new frame
frame.grid(row=2,column=1)
frame.config(height=200, width=200, relief=RIDGE, padding=(10,10))
l1 = ttk.Label(frame, text="User name").grid(row=0, column=0)
etUserName = ttk.Entry(frame, width=20).grid(row=0, column=1)
l2 = ttk.Label(frame, text="Password").grid(row=1,column=0)
etpassword = ttk.Entry(frame, width=20, show="*").grid(row=1, column=1)
buLogin = ttk.Button(frame,text="Login").grid(row=2,column=1)
def BuClick():
print("Username: {},Password: {}".format(etUserName.get(),etpassword.get()))
buLogin.config(command=BuClick)
root.mainloop()
error is occuring here in config
buLogin.config(command=BuClick)
same questions which are already does not addressed my problem directly i checked the similar questions but couldn't able to find the answer that's why i post this question.