recently I began to work with tkinter. I try to create a Grade manager and when I try to save the input from an Entry box, but every way I try, the result is an error or 'None'
def check_value(self,Input_Name):
Name = Input_Name.get()
print(Name)
def add_Student(self, window):
print("Yes")
Input_Name = tk.Entry(window, bg='blue').pack()
Button(window, text="Show", command=lambda: self.check_value(Input_Name)).pack()
For this piece of code the following error is :
Exception in Tkinter callback Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1520.0_x64__qbz5n2kfra8p0\lib\tkinter_init_.py", line 1883, in call return self.func(*args) File "C:/Users/User/PycharmProjects/pythonProject/main.py", line 28, in Button(window, text="Show", command=lambda: self.check_value(window.Input_Name)).pack() File "C:/Users/User/PycharmProjects/pythonProject/main.py", line 20, in check_value Name = Input_Name.get() AttributeError: 'NoneType' object has no attribute 'get'