0

Parsing following file ( in my case with 'header:true' ) :

FN1,FN2,FN3
A1,A2,A3
B1,B2,B3
C1,C1,C3
D1,D2,D3

makes Papaparse fail on

Row 4 : Too few fields: expected 3 fields but parsed 1

Please note this is a stripdown of a much larger file where the consecutive values where deep down the file.

Is this a bug or am I doing something wrong ?

jdla
  • 21
  • 4

1 Answers1

1

There is some kind of anomaly, but not exactly as I pointed out.

The problem seems to stem from the last bytes of the file being \r\n. Papaparse interprets one additional (empty) line therefore.

It is complaining on that one. (and I misinterpreted the row information : 1 based counting , stripped header row , my double value coincidentally on the one but last row)

Configuring skipEmptyLines : true solves the issue.

I am still inclined though to call it a bug as there's not really an empty line at the end.

jdla
  • 21
  • 4