On 01/05/2014 10:47 AM, eneskri...@gmail.com wrote:
Now it is giving me this error, after changing to helper = var[r.get()]
line 27, in submit_data
self.something_else[r][1] += 1
TypeError: list indices must be integers, not IntVar
In such an easy case, you really ought to be able to read the error and
understand it rather than needing to rely on us to do that for you.
The message:
List indices must be integers, not IntVar
clearly indicates you are indexing a list with something of type IntVar
instead of the required int. That would have to be the ...[r]. The
value of r is *not* an integer, it's an IntVar which is container of an
int but not an int itself. You can access the contained int with
r.get(), so perhaps ...[r.get()] is what you want. (Or perhaps not...
We really don't know what you are trying to do here.)
Reading error messages and understanding tracebacks are skills well
worth trying to develop. Good luck.
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list