Python Forum
TypeError: 'Table' object is not callable
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TypeError: 'Table' object is not callable
#1
Hi, I've been trying to make a GUI interface which is updatable and connected to SQLite however I'm receiving the following error:
TypeError: 'Table' object is not callable

It may be a stupid error but I'm below even a novice with this kinda stuff so any help would be greatly appreciated to get the program working again! :)

from msilib.schema import ListBox
from tkinter import *
from matplotlib.pyplot import grid

# Create Window Object
window = Tk()
# Define table contents (each row/column)
l1 = Label(window, text="Name")
l1.grid(row=0, column=0)

l1 = Label(window, text="Monthly Income")
l1.grid(row=1, column=0)

l1 = Label(window, text="Monthly Budget")
l1.grid(row=2, column=0)

l1 = Label(window, text="Monthly Expenses")
l1.grid(row=3, column=0)

# Define Entries
name_text = StringVar()
e1 = Entry(window, textvariable=name_text)
e1.grid(row=0, column=1)

Monthly_Income_text = StringVar()
e2 = Entry(window, textvariable=Monthly_Income_text)
e2.grid(row=0, column=2)

Monthly_Budget = StringVar()
e3 = Entry(window, textvariable=Monthly_Budget)
e3.grid(row=0, column=3)

Monthly_Expenses = StringVar()
e4 = Entry(window, textvariable=Monthly_Expenses)
e4.grid(row=0, column=4)

# Define ListBox
list1 = ListBox(window, height=35, width=35)
list1.grid(row=2, column=0, columnspan=2)

# Attach scrollbar to the list
sb1 = Scrollbar(window)
sb1.grid(row=2, column=2, rowspan=6)

list1.configure(yscrollcommand=sb1.set)
sb1.configure(command=list1.yview)

# Define buttons
b1 = Button(window, text="View All", width=12)
b1 = grid(row=2, column=3)

b1 = Button(window, text="Search Entry", width=12)
b1 = grid(row=3, column=3)

b1 = Button(window, text="Add Entry", width=12)
b1 = grid(row=4, column=3)

b1 = Button(window, text="Update Selected", width=12)
b1 = grid(row=5, column=3)

b1 = Button(window, text="Delete Selected", width=12)
b1 = grid(row=6, column=3)

b1 = Button(window, text="Close", width=12)
b1 = grid(row=7, column=3)

window.mainloop()
Reply


Messages In This Thread
TypeError: 'Table' object is not callable - by Melford - Jan-21-2020, 07:41 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020