So this is the code python doesn't seem to be too happy with me about:
def checkAnswer(self, clickedButton):
self.valueOne = self.itemOne[self.component]
self.valueTwo = self.itemTwo[self.component]
if clickedButton == 'left':
if self.valueOne >= self.valueTwo:
tkinter.messagebox.showinfo('Smart Cookie!', 'That\'s correct!')
else:
tkinter.messagebox.showerror('Oh No!', 'That\'s incorrect!')
elif clickedButton == 'middle':
if self.valueOne - (self.valueOne * 0.1) <= self.valueTwo <= self.valueOne + (self.valueOne * 0.1) and self.valueTwo - (itemTwoComp * 0.1) <= self.valueTwo <= self.valueTwo + (self.valueTwo * 0.1):
tkinter.messagebox.showinfo('Smart Cookie!', 'That\'s correct!')
else:
tkinter.messagebox.showerror('Oh No!', 'That\'s incorrect!')
elif clickedButton == 'right':
if self.valueTwo >= self.valueOne:
tkinter.messagebox.showinfo('Smart Cookie!', 'That\'s correct!')
else:
tkinter.messagebox.showerror('Oh No!', 'That\'s incorrect!')
showQuestion()
tkinter.mainloop()
showQuestion()
gui = ProgramGUI()
and this is the error I'm receiving:
Traceback (most recent call last):
File "C:\Assignments\Assignment 2\FIddle.py", line 101, in <module>
gui = ProgramGUI()
File "C:\Assignments\Assignment 2\FIddle.py", line 99, in __init__
showQuestion()
File "C:\Assignments\Assignment 2\FIddle.py", line 60, in showQuestion
self.lab11.configure(text = self.itemList[0]['Name'])
File "C:\AppData\Local\Programs\Python\Python35\lib\tkinter\__init__.py", line 1330, in configure
return self._configure('configure', cnf, kw)
File "C:\AppData\Local\Programs\Python\Python35\lib\tkinter\__init__.py", line 1321, in _configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: invalid command name ".2531617022640.2531617023144"
I'm not sure why I'm receiving this error at all, would very much appreciate it if anyone could identify the problem.