Thank you so much for the very quick reply. As soon as I saw it, I knew, "I should have thought of that", but I didn't Now to the bad news...
I made those changes but still have the same problem.
The error is:
My updated code:
I made those changes but still have the same problem.
The error is:
File "D:\Projects\Pycharm\DSAFinalProject\EnterBook.py", line 27, in SaveBook book = Book(self.entBookTitle.get(), self.entBookISBN.get(), self.entBookAuthor.get(), self.entBookYear.get()) ^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get'What am I missing?
My updated code:
from tkinter import * from tkinter import ttk from Book import * class EnterBookWindow(Toplevel): def __init__(self): Toplevel.__init__(self) self.title("Enter a Book in xx Data Structure") self.geometry('400x400') frameLeft = Frame(self, width=40, padx=20, pady=20) frameLeft.pack(side=LEFT) frameRight = Frame(self, width=40, padx=20, pady=20) frameRight.pack(side=RIGHT) lblTitle = ttk.Label(frameRight, text="Title:").pack(padx=10, pady=0) self.entBookTitle = ttk.Entry(frameRight, font=('Helvetica', 12), width=20).pack(padx=10, pady=10) lblISBN = ttk.Label(frameRight, text="ISBN:").pack(padx=10, pady=0) self.entBookISBN = ttk.Entry(frameRight, font=('Helvetica', 12), width=20).pack(padx=10, pady=10) lblAuthor = ttk.Label(frameRight, text="Author:").pack(padx=10, pady=0) self.entBookAuthor = ttk.Entry(frameRight, font=('Helvetica', 12), width=20).pack(padx=10, pady=10) lblYear = ttk.Label(frameRight, text="Year:").pack(padx=10, pady=0) self.entBookYear = ttk.Entry(frameRight, font=('Helvetica', 12), width=20).pack(padx=10, pady=10) btnSave = ttk.Button(frameRight, text="Save Data", command=self.SaveBook).pack(padx=20, pady=10) def SaveBook(self): book = Book(self.entBookTitle.get(), self.entBookISBN.get(), self.entBookAuthor.get(), self.entBookYear.get())