You have no idea about the rest of the code so sit down. Clearly you´re not here to help so the door is right there. Ta ta.
I know you are a Python fanboy. That error was raised at runtime. A nasty way to find errors in a trading algorithm. Keep using that shit language, there it is for you.
How old are you? 12? Well since you are utterly unable to engage in a constructive conversation you got sent to the ignore list. Congrats.
Ma'boy Leopard replied to every message until he got what he was after, for free. Now that he doesn't need anything he shows himself. A regular parasite. He will come back begging for more fixes. Why do you think that his developer ran away?
With all due respect Drawdown, however you feel about Python, he's parsing a stream of text... the error will always be at runtime no matter what. IOW, even a more statically typed language will need to error out at run-time if the parser isn't robust enough (or the stream is corrupt). If you're stuck using Python and your project would benefit from static type checking you can consider hints, annotations and mypy. The point being there is an engineering tradeoff between more v. less static typing and languages like Python try to accommodate both.
I am not stuck using Python, I don't use that shit at all. Basically because I have been forced to use it at work for years. And I know the problems that it causes. Python is ok for small scripts that need something quick to be done. If you try to use it for large projects you end up debugging everything at runtime. You can see that you are recommending extra libraries to fix the language, that is because the langauge is not ready. Just as a simple example, if you use a language like c# the compiler would have warned and highlighted that the line that is trying to parse the literal should check that the length of the array is correct, because the developer has hardcoded an index. Neither the initial developer nor the amazing fix that maverick was supposed to give has checked that. If you see that in a code you know that it has more errors down the line. That is why I asked for the whole code, to see the level of shit that has been developed. OP thinks that I am trying to steal his shitty algorithm. Python makes you lazy and able to write shit code. Not said by me only.
Sounds like you have a huge chip on your shoulder and that's a bigger problem than the language you choose. But, you're free to use any programming language you want. You're entitled to your opinion... as is everyone else (1, 2, 3, 4, 5). I simply try to use the right tool for the job without falling prey to unfounded bias; it's not always easy.
And he agreed. Lol... that's why he's got a bias for compiled languages. WTF is this world coming to??!?!