I'm making a GUI using Tkinter which allows data to be entered in one of the windows:
enterscore = Entry(window4, font="Helvatica 25", textvariable = newscore).pack()
I am trying to make a button which will save the entered data as a variable:
savebttn = Button(window4, text= "Save", width=5, height=2, font="Helvatica 25", command = savescore).pack()
Where:
def savescore():
score = enterscore.get()
However, if I run the program it returns the error message:
AttributeError: 'NoneType' object has no attribute 'get'
Where am I going wrong?