Okay so here's the problem:
I'm looping through data of diffrent timeframes, which is saved in a dictionary (keyed by sid) of lists (context.candlestick_"timeframe")
data_handle = "context.candlestick_" + timeframe
if len(data_handle[sid]) > 2:
-> Runtime exception: IndexError: string index out of range
Strangely enough it seems to work like this once and another time where it's mostly the same it doesn't.
I've also tried using:
if len("context.candlestick_%s[sid]" % (timeframe))
-> Same error
Does len() put out the length of the string or the length of the list (which is what I want, and expected it to do especially in the first code)?
Please let me know if there is a smarter and most importantly working way of doing this, as i can't find a solution right now. Thanks!