Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse Error: expected: '\"' got: 'undefined' #136

Closed
tejasmanohar opened this issue Apr 20, 2016 · 2 comments
Closed

Parse Error: expected: '\"' got: 'undefined' #136

tejasmanohar opened this issue Apr 20, 2016 · 2 comments

Comments

@tejasmanohar
Copy link

tejasmanohar commented Apr 20, 2016

"message":"Parse Error: expected: '\"' got: 'undefined'. at '","name":"Error","stack":"Error: Parse Error: expected: '\"' got: 'undefined'. at '\n    at parseEscapedItem (/src/node_modules/fast-csv/lib/parser/parser.js:76:23)\n    at ParserStream.parseLine [as parser] (/src/node_modules/fast-csv/lib/parser/parser.js:175:30)\n    at ParserStream._parseLine [as _parse] (/src/node_modules/fast-csv/lib/parser/parser_stream.js:169:25)\n    at ParserStream.extended.extend._flush (/src/node_modules/fast-csv/lib/parser/parser_stream.js:236:18)\n    at ParserStream.\u003canonymous\u003e (_stream_transform.js:118:12)\n    at ParserStream.g (events.js:260:16)\n    at emitNone (events.js:67:13)\n    at ParserStream.emit (events.js:166:7)\n    at spreadArgs (/src/node_modules/fast-csv/lib/extended.js:39:25)\n    at ParserStream.extended.extend.emit (/src/node_modules/fast-csv/lib/parser/parser_stream.js:306:13)\n    at prefinish (_stream_writable.js:458:12)\n    at finishMaybe (_stream_writable.js:466:7)\n    at afterWrite (_stream_writable.js:347:3)\n    at onwrite (_stream_writable.js:337:7)\n    at WritableState.onwrite (_stream_writable.js:89:5)\n    at afterTransform (_stream_transform.js:79:5)"},"fields.time":"2016-04-20T21:27:37.808Z"

How should you go about debugging errors like this? This error happens while parsing a streaming CSV in production after lots of lines. Is there something I could add to logs to get more info about what character the parser is tripping up on? Can't really figure out what the quote / escape option values should be given 'undefined'.

here is the supposed format of my CSV. Is a custom delimiter or escape character necessary?

@dustinsmith1024
Copy link
Contributor

I think the options quote='"' and escape='"' would be correct according to the Salesforce docs.

Can you pull the file down locally and run it? You can put some logging in the data handler to help find a row number.

@doug-martin
Copy link
Contributor

Closing due to lack of activity. Create a new issue if this is still a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants