testingdays = testingData.getMeasurements()
for day in testingdays:
dayValues = []
dayValues[0].append(day.tempMean)
dayValues[1].append(day.tempMax)
dayValues[2].append(day.tempMin)
dayValues[3].append(day.dewPoint)
dayValues[4].append(day.humidMean)
dayValues[5].append(day.humidMax)
dayValues[6].append(day.humidMin)
dayValues[7].append(day.pressure)
dayValues[8].append(day.meanWindSpeed)
dayValues[9].append(day.maxWindSpeed)
dayValues[10].append(day.maxGustSpeed)
dayValues[11].append(day.visibility)
this is my code and when i try to run it i get the error message:
"Traceback (most recent call last):
File "main.py", line 166, in <module>
dayValues[0].append(day.tempMean)
IndexError: list index out of range"
Each day has 12 classes/elements so the list index shouldn't be out of range!
I've got code just before this which pops items from a list, but this part shouldn't be involved with that so i'm not sure why i get this error message
sorry, not sure if i've posted enough information to get help with this!
Thanks