I can't figure out why I get this error. The sheet is found here: https://docs.google.com/spreadsheets/d/1gBXtHjEhnNSEkJYq2upCWtwkj1ZLWiUYv6KSuMH8Nds/edit?usp=sharing
Here's the first part of the script where it seems to hang up. The last line is line 13 referenced in the error message.
function pushToCalendar() {
//spreadsheet variables
var sheet = SpreadsheetApp.getActiveSheet();
var headerRows = 1;
var range = sheet.getDataRange();
var data = range.getValues();
for (var i in data) {
if (i < headerRows) continue;
var row = data[i]
var tstart = new Date(row[8]);
tstart.setDate(date.getDate());
}
}