I am trying to submit the form submission using tkinter.But i got an error stating 'NoneType' object has no attribute 'get'.I don't know why it happend.
def onsubmit():
email=email_entry.get()
myconn = mysql.connector.connect(host = "localhost", user = "root",password =
"",database="project")
cur = myconn.cursor()
sql1="INSERT INTO
register(name,email,gender,qualification,courses,username,password)values(%s,%s,%s,%s,%s,%s,%s)"
values=[(name,email,gender,qualification,check_list,username,password)]
cur.executemany(sql1,values)
myconn.commit()
myconn .close()
global email_in
lemail=Label(root,text="Email",width=20,font=("bold",10)).place(x=80,y=180)
email_entry=Entry(root).place(x=240,y=180)
sub=Button(root,text="Submit",bg='brown',fg='white',width=20,command=onsubmit).place(x=160,y=480)
root.mainloop()
error shown in below
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\PYTHON\lib\tkinter\__init__.py", line 1883, in __call__
return self.func(*args)
File "C:/Users/Softech/Desktop/pr.py", line 25, in onsubmit
email=email_entry.get()
AttributeError: 'NoneType' object has no attribute 'get'