Jan-18-2017, 07:38 PM
(Jan-18-2017, 06:58 PM)micseydel Wrote: 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.I really don't understand what i need to do. Like i said i only know basics. In the IPS, i ran the line to produce a simulation with the strategy i coded, and its working due to a error. That is all i know.
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.