Financial Analysis Capstone Project: Value Error

Does this have to do with the function I have written or with another line of code above? Any help is appreciated, thanks.