CSV w/ Empty Last Line causes ECONNRESET for short files.
See original GitHub issueWe have been using v1.0.3 without issue, upgraded to 1.1.3 and have been having issues.
On a really short CSV file, if there is a trailing line break (i.e. last line empty), it will throw a ECONNRESET error.
From digging into it, it looks like the csvLineBuffer gets set to empty (via setPartial) and because of this when _flush is called it doesn’t wait until everything is done processing. I think this is because it could be a partial new line, but essentially any buffer that happens to end on a line break will trigger this, as well as a file that ends on it.
This is a sample CSV we were using
code,name
C,Cinema
D,Direct Mail
B,Mobile
O,Online Display
E,Online Video
M,Opt-In Email
X,Outdoor
P,Print
R,Radio
S,Social
T,Television
V,Viral
M,Opt-In Email
X,Outdoor
P,Print
R,Radio
S,Social
T,Television
V,Viral
Edit: it seems to work without issue on longer files. Our current highWaterMark is 10,000. It also only happens with workerNum > 1
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:5 (2 by maintainers)
Top Results From Across the Web
CSV file written with Python has blank lines between each ...
This code reads thefile.csv , makes changes, and writes results to thefile_subset1 . However, when I open the resulting csv in Microsoft Excel,...
Read more >support csv files ending with empty last line · Issue #150
It is not uncommon to have files ending with an empty line. Papaparse fails in handling these, returning errors about malformed file.
Read more >Bug listing with status RESOLVED with resolution FIXED as at ...
Bug listing with status RESOLVED with resolution FIXED as at 2022/12/24 19:46:07 ... Bug:1824 - "ebuild for LFM (Last File Manager)" status:RESOLVED ...
Read more >"Error reading native data" When Processing CSV File With ...
Oracle(R) BPEL Process Manager 10g - Version 10.1.3.3 and later: "Error reading native data" When Processing CSV File With Empty Line From ...
Read more >elasticdump
Standard Install. Elasticdump works by sending an input to an output . Both can be either an elasticsearch URL or a File. Elasticsearch:....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Yes
Close due to no activity