kotlin-csv icon indicating copy to clipboard operation
kotlin-csv copied to clipboard

Seeing a parsing error when quotes within text

Open pkreddy04 opened this issue 3 years ago • 1 comments
trafficstars

When running this file through the parser ID|Headline|State|Billable_Indicator|Ticket_Type|CR_Source|Severity|Priority_Requested|Submitter|AssignTo|Owner|BusinessArea|ChangeType|DateSubmitted|DateClosed RQ_SS041348|WGHT tements- Change "Grains" to "Members"|01A-SW_Processing|Y|CR|External|3-Medium||Shagh Just|Lios, Yun |Shagh, Just |11.00-Unknown|CHIP|3/15/2022 5:53:44 PM|

Seeing an error as below

Aug 30 00:10:57 a4863ee8a2574a3 ckm-gainwell-wv-rqms-case-incident-source-connector[599313]: com.github.doyaaaaaken.kotlincsv.util.CSVParseFormatException: must appear escapeChar(") after escapeChar(") [rowNum = 34, colIndex = 56, char = "] Aug 30 00:10:57 a4863ee8a2574a3 ckm-gainwell-wv-rqms-case-incident-source-connector[599313]: at com.github.doyaaaaaken.kotlincsv.parser.ParseStateMachine.read(ParseStateMachine.kt:59) Aug 30 00:10:57 a4863ee8a2574a3 ckm-gainwell-wv-rqms-case-incident-source-connector[599313]: at com.github.doyaaaaaken.kotlincsv.parser.CsvParser.parseRow(CsvParser.kt:29) Aug 30 00:10:57 a4863ee8a2574a3 ckm-gainwell-wv-rqms-case-incident-source-connector[599313]: at com.github.doyaaaaaken.kotlincsv.client.CsvFileReader.readUntilNextCsvRow(CsvFileReader.kt:95) Aug 30 00:10:57 a4863ee8a2574a3 ckm-gainwell-wv-rqms-case-incident-source-connector[599313]: at com.github.doyaaaaaken.kotlincsv.client.CsvFileReader.readNext(CsvFileReader.kt:33) Aug 30 00:10:57 a4863ee8a2574a3 ckm-gainwell-wv-rqms-case-incident-source-connector[599313]: at com.github.doyaaaaaken.kotlincsv.client.CsvFileReader$readAllAsSequence$1.invoke(CsvFileReader.kt:42) Aug 30 00:10:57 a4863ee8a2574a3 ckm-gainwell-wv-rqms-case-incident-source-connector[599313]: at com.github.doyaaaaaken.kotlincsv.client.CsvFileReader$readAllAsSequence$1.invoke(CsvFileReader.kt:41)

This seems like a proper CSV file and should not be throwing an error

pkreddy04 avatar Aug 31 '22 18:08 pkreddy04

@pkreddy04 Hi, could you show me how to reproduce this error? What options of csvReader did you use? Please show me a code snippet.

doyaaaaaken avatar Sep 01 '22 07:09 doyaaaaaken