Dataset : IndexError: list index out of range

Which line of code is throwing this error?
Could it be that indexing label is not working or the x = read(...)[0] call?