this is a part of my code, i'm trying to get the value from the Entry bf, but when i run it shows that: "AttributeError: 'NoneType' object has no attribute 'get'". Does anyone knows why that is happening?
Code:
from tkinter import *
window = Tk()
window.geometry("650x450+500+300")
def Calcular():
print("teste")
print(bf.get())
Geom = LabelFrame(window, text = "Dados Geométricos", font="Arial 12", width=200)
Geom.place(x=290, y=10)
Label(Geom, text ="bf: ", font="Arial 12").grid(column=0, row=0, sticky=E)
Label(Geom, text =" cm", font="Arial 12").grid(column=2, row=0, sticky=W)
bf = Entry(Geom, width=5, justify= RIGHT, font="Arial 12").grid(column=1, row=0)
btnCalcular = Button(window, text="Calcular", font="Arial 12", command=Calcular)
btnCalcular.place(x=50, y=180, width = 150)
window.mainloop()