TypeError: 'NoneType' Object Is Not Callable With Tkinter
I am trying to make a program that will play sounds on a button press. But i am having a trouble calling a function. What I want to do is click on the LowC (or any other note) bu
Solution 1:
You have both an attribute and a method named LowC
.
this.LowC = Button(this,
text = "Low C",
command = this.LowC,
).grid()
...
#create freq conversion
def LowC(this):
this.freq = 262
print(this.freq)
this.Launch()
You should rename one of them.
By the way, if you do self.some_name = Button(args).grid()
, then self.some_name
will be None
, because you're assigning the result of grid
to the variable, not the Button
instance that you want.
Post a Comment for "TypeError: 'NoneType' Object Is Not Callable With Tkinter"