'>' not supported between instances of 'IntVar' and 'IntVar' '>' not supported between instances of 'IntVar' and 'IntVar' tkinter tkinter

'>' not supported between instances of 'IntVar' and 'IntVar'


In this line:

while AMNT_REPEAT > x :

You compare two IntVar instances which raises a TypeError. My guess is that you want to compare their values, which would be done by:

while AMNT_REPEAT.get() > x.get():

P.S.In the code you do:

x = 0x = IntVar()

The first declaration is superfluous as it will be overridden immediately by the second one.


IntVar() types don't support comparison so you have to convert them to int.

Change:

AMNT_REPEAT > x

To:

AMNT_REPEAT.get() > x.get()