Your code is unfortunately not executable and also doesn’t show a minimal snippet yielding the error. You can also format code by wrapping it into three backticks ``` 
Based on the screenshot, range(classes) raises the error, since classes is a tuple while an int is expected.