Feb-07-2022, 03:24 PM
The error is in line 17
import tkinter as tk from tkinter.ttk import * window = tk.Tk() def Adder(): AddingWindow = tk.Toplevel(window) AddingWindow.geometry("400x400") Label(AddingWindow, text="Mail/Username", width="20", font="Calibri 22 bold").pack() name = Entry(AddingWindow, width=50) name.pack() Label(AddingWindow, text="Password", width="20", font="Calibri 22 bold").pack() passw = Entry(AddingWindow, width=50) passw.pack() Add = Button(AddingWindow, text="Add", width="20").pack() def Save(): Password = passw.get() print(Password) window.geometry("500x500") greeting = tk.Label(text="Password Manager: Developed by KEIKAS", font="Calibri 20 bold") AddB = tk.Button(text="Add", width="20",height="2",bg="green", command=Adder) AccessB = tk.Button(text="Access", width="20",height="2",bg="blue") RemoveB = tk.Button(text="Remove", width="20",height="2",bg="red") greeting.pack() AddB.pack() RemoveB.pack() AccessB.pack() window.mainloop()
Error:NameError: name 'passw' is not defined