Thank you for the help. I believe I put a bandaid on the problem at least.
I was getting an error that I could not split on an empty line after all the lines of the csv had been processed.
I believe this stems from windows and linux treating csv and txt files (and pdf) slightly differently. (I know this is somewhat hand-wavey and that is because I’m not sure of the details on how.)
Anyhoo, I believe the Rpi thought there was an empty row at the end of the file. I put a check in the foreach row section to see if it’s length was >0 and put the splits in that block.
rows.forEach(row => {
if (row.length>0){
const cols = row.split(',');
console.log(cols);
const changedate = cols[17].split(" ");
console.log(changedate);
years.push(cols[16]+ ' '+ changedate[0]);
amount.push(parseFloat(cols[18]));
}});
And this seems to get rid of the error and let the rest of the page load successfully.
If I wasn’t successful this time I would have scrubbed my salary data out of my file and posted that as well and maybe you would have had the same error.
Is there a better way to not get an empty row at the end of a file. I checked and it didn’t seem there was a /n at the end of the last line in my csv.