List indices must be integers or slices, not float: error only second time referring to parameters, not first

In that case there might be blank rows in your spreadsheet, especially if the error doesn’t come up on the first trial.