[Node.js][node-csv] Error: Invalid closing quote at line 1; found " " instead of delimiter "\ "

Tadashi Shigeoka ·  Fri, February 21, 2014

When using the CSV Parser node-csv available for Node.js, I encountered the following error when tab-separated text contained double quotes ”.

wdavidw/node-csv

Error: Invalid closing quote at line 1; found " " instead of delimiter "\  "
  at [object Object].Parser.write (/u/apps/com/shared/node_modules/csv/lib/parser.js:104:29)
  at [object Object].CSV.write (/u/apps/com/shared/node_modules/csv/lib/index.js:275:17)
  at write (_stream_readable.js:583:24)
  at flow (_stream_readable.js:592:7)
  at ReadStream.pipeOnReadable (_stream_readable.js:624:5)
  at ReadStream.EventEmitter.emit (events.js:92:17)
  at emitReadable_ (_stream_readable.js:408:10)
  at emitReadable (_stream_readable.js:404:5)
  at readableAddChunk (_stream_readable.js:165:9)
  at ReadStream.Readable.push (_stream_readable.js:127:10)
  at onread (fs.js:1561:12)
  at Object.wrapper [as oncomplete] (fs.js:454:17)

Since it was a partially manually created CSV file, I removed the double quotes and solved it.


Reference Information

double quotes in a tab-delimited file throws error · Issue #46 · wdavidw/node-csv

That’s all from the Gemba.