That error means that you have an int variable, but you are using it as a list.
For example, if my program had a variable x = 5 and later I tried to use x[2], then that error would happen because x is an int and doesn't have subscripts like [2].
If may be that in your for loops, you have a variable that you thought was storing a row, (which would be a list), but it is actually storing an index value (which would be an int).