beamworks / react-csv-importer

Uploader + CSV parser + raw file preview + UI for custom user column mapping, all in one
https://www.npmjs.com/package/react-csv-importer
MIT License
231 stars 95 forks source link

Import error: Invalid non-string/buffer chunk #40

Closed jabidof closed 3 years ago

jabidof commented 3 years ago

Great lib, thanks for the job.

I did the integration in my codebase and after testing a "simple" CSV file, the only result I get is the error below: Import error: Invalid non-string/buffer chunk The same file works in your Sandbox example. Do you have got any clue where this could come from?

Thanks and greetings from Switzerland.

image

unframework commented 3 years ago

Hi @jabidof, thanks for the bug report! Are you using custom PapaParse settings, and if so what are they? Hoping that we can investigate the issue via differences between sandbox and your usage. Thanks!

jabidof commented 3 years ago

@unframework Sure thanks! Here they are: { delimiter: "", // auto-detect newline: "", // auto-detect quoteChar: '"', escapeChar: '"', header: false, transformHeader: undefined, dynamicTyping: false, preview: 0, encoding: "", worker: false, comments: false, step: undefined, complete: this.handleOnCompleteParse, error: undefined, download: false, downloadRequestHeaders: undefined, downloadRequestBody: undefined, skipEmptyLines: false, chunk: undefined, chunkSize: undefined, fastMode: undefined, beforeFirstChunk: undefined, withCredentials: undefined, transform: undefined, delimitersToGuess: [',', '\t', '|', ';', Papa.RECORD_SEP, Papa.UNIT_SEP] }

unframework commented 3 years ago

Did this issue keep showing up? Closing for now, but if there is a short test file to repro the issue please reopen and attach it. Thanks!