I am getting this error when i am running my code of SIMPLE GUI
AttributeError: 'NoneType' object has no attribute 'get'
The gui is pretty simple in itself it is mostly about creating a software login function with serial key.I saw some tutorials online and created this example which when i run i get a error.How can i solve this ?
from tkinter import *
root1 = Tk()
root1.geometry("700x330+350+300")
key = "Agcy5x7kZe"
frame = LabelFrame(root1)
def Submitcommand():
a = entry.get()
b = serialentry.get()
print(a)# To check
print(b)# To check
photo = PhotoImage(file = 'gil.png')
photo1 = Label(frame , image = photo).grid(row = 0 , column = 0 , columnspan = 2 , pady = (0 , 20))
username = Label(frame, text = "Username :" , font = "helvetica 30 bold").grid(row = 1 , column = 0)
entry = Entry(frame, bd = 5 , font = "Lucida 30 bold" , width = 25).grid(row = 1 , column = 1)
label = Label(frame, text = "Serial Key : " , font = "helvetica 30 bold").grid(row = 2 , column = 0)
serialentry = Entry(frame, bd = 5 , font = "Lucida 30 bold" , width = 25).grid(row = 2 , column = 1)
submit = Button(frame , text = "Login" , height = 2 , width = 10 , command = Submitcommand).grid(row = 3 , column = 1 , columnspan = 2 , pady = (0 , 20))
frame.place(relx = 0.5 , rely = 0.5 , anchor = CENTER)
root1.mainloop()