When I run the code, it clearly displays the login scren, however whenever I try to enter details and submit, it gives back "AttributeError: 'NoneType' object has no attribute 'get", therefore why?
from tkinter import *
from tkinter import ttk
root = Tk()
root.title("Test_Login")
root.geometry("750x500+270+100")
def sayHello():
e_text = e1.get()
name_var2 = e2.get()
Label(main, text=e_text + " " + name_var2).grid(row=4, column=0, columnspan=2)
main = Frame(root, width=700, height=498)
label1 = Label(main, text="First Name", font=("Arial", 12)).grid(row=0, column=0, padx=5, pady=5)
e1 = ttk.Entry(main, width= 30, font=('Century 12')).grid(row=0, column=1, padx=5, pady=5)
label2 = Label(main, text="Last Name", font=("Arial", 12)).grid(row=1, column=0, padx=5, pady=5)
e2 = ttk.Entry(main, width= 30,font=('Century 12')).grid(row=1, column=1, padx=5, pady=5)
Checkbutton(main, text = "I aggree to the terms and conditions", \
onvalue = 1, offvalue = 0).grid(row=3, column=0, columnspan=2, sticky=W)
btn = Button(main, text="LOGIN", font=("Arial", 15), bg="#1a94ff", command=sayHello).grid(row=2, column=0, columnspan=2)
main.place(relx=0.5, rely=0.5, anchor=CENTER)
root.mainloop()