Jan-18-2017, 06:58 PM
You're posting way more code than is necessary and no traceback. The error you show doesn't even have indexing in the code snippet.
Here's a Python session that has code that could reproduce the kind of error you're seeing
To post less code, you should find the exactly line which is having the problem, print the string and the index before that line crashes, and post back here with as little code as possible that reproduces your problem that you need help solving. It could be as simple as what I just showed above, but if you're really reducing it, it should be fewer than 10 lines and probably fewer than 5.
Here's a Python session that has code that could reproduce the kind of error you're seeing
>>> "Hello, world!"[100] Traceback (most recent call last): File "<pyshell#9>", line 1, in <module> "Hello, world!"[100] IndexError: string index out of rangeNote that there's a string, and an index operator (using square brackets).
To post less code, you should find the exactly line which is having the problem, print the string and the index before that line crashes, and post back here with as little code as possible that reproduces your problem that you need help solving. It could be as simple as what I just showed above, but if you're really reducing it, it should be fewer than 10 lines and probably fewer than 5.