I found the error. It was actually in the file the script was getting. Thanks for the help