Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

'NoneType' object has no attribute 'append' to list

My code is the following:

Error = str('ERROR')
payTotalList = []
for i in range(len(hoursList)):
    payTotal = computePay(float(hoursList[i]), float(rateList[i]))
    payTotalList.append(payTotal)
    if float(hoursList[i]) > 80:
        Error = str(sheet.cell(row = 1 + i, column = 4).value) 
    else:
        payTotalList = sheet.cell(row = 1 + i, column = 4).value

When I am trying to append "payTotal" to "payTotalList" I get the error " 'NoneType' object has no attribute 'append' ". How do I go about fixing this? I tried concatenating payTotal to payTotalList, but it comes back with you cannot concatenate floats to list?

Comments