Ошибка в tkinter python с аргументом self
Вот код
from tkinter import *
import tkinter as tk
from password_generator import PasswordGenerator
root = tk.Tk()
pwo = PasswordGenerator()
def Generate():
text.delete(0.0, END)
text.insert(END, pwo.generate())
return pwo.generate()
bigchar = IntVar()
smallchar = IntVar()
specialchar = IntVar()
number = IntVar()
symbol = IntVar()
#Labels
input1 = tk.Label(root, text="Symbols").grid(row=1)
input2 = tk.Label(root, text="Big chars").grid(row=2)
input3 = tk.Label(root, text="Small chars").grid(row=3)
input4 = tk.Label(root, text="Numbers").grid(row=4)
input5 = tk.Label(root, text="Special characters").grid(row=5)
#Buttons
buttonA = tk.Button(root, text="Generate", command=Generate)
Symbols = Entry(root)
BigChars = Checkbutton(text="Big chars", variable=bigchar)
SmallChars = Checkbutton(text="Small chars", variable=smallchar)
SpecialChars = Checkbutton(text="Special chars", variable=specialchar)
Numbers = Checkbutton(text="Numbers", variable=number)
symbol = int(Entry.get(self))
#Text
text = tk.Text(root, height=1, width=10)
#Password Generator Config
pwo.minlen = symbol
pwo.maxlen = symbol
pwo.minuchars = smallchar # (Optional)
pwo.minlchars = bigchar # (
pwo.minnumbers = number # (Optional)
pwo.minschars = special # (Optional)
Symbols.grid(row=1, column=1)
BigChars.grid(row=2, column=1)
SmallChars.grid(row=3, column=1)
SpecialChars.grid(row=4, column=1)
Numbers.grid(row=5, column=1)
buttonA.grid(row=0, column=0)
text.grid(row=0, column=1)
root.mainloop()
Почему я получаю ошибку self is not defined хоть оно само говорило что там не хватает аргумента self?