mholt / PapaParse

Fast and powerful CSV (delimited text) parser that gracefully handles large files and malformed input
http://PapaParse.com
MIT License
12.44k stars 1.14k forks source link

Parsing big files in Chrome #770

Closed inirudebwoy closed 4 years ago

inirudebwoy commented 4 years ago

Hello :)

Thank you for this super useful library. I have found some strange behaviour in Chrome and would like to confirm that it is an issue or get some guidance in case I messed up.

We are parsing big ~600MB csv files and papaparse (5.1.1) is working fine in Safari (Version 13.0.5 (15608.5.11)) and Firefox (73.0.1 (64-bit)) but fails in Chrome (Version 80.0.3987.132 (Official Build) (64-bit)).

Error we are getting is

{type: "Delimiter", 
 code: "UndetectableDelimiter", 
 message: "Unable to auto-detect delimiting character; defaulted to ','"
}

File has tabs as delimiter fields.

This is how we call parse

Papa.parse(file, {
        complete: (res, file) => {
            console.log(res.errors);
    }
})

I have tested the file on the demo site https://www.papaparse.com/demo and can confirm that it behaves the same. Is this an issue in Chrome or do we have to handle it differently?

pokoli commented 4 years ago

It seems like an error from chrome browser.

I think you can fix it by manually specifing the delimiter for the file.

inirudebwoy commented 4 years ago

Right, thank you.