You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't reliably reproduce the issue, but I am frequently getting this exception:
e: com.univocity.parsers.common.TextParsingException: java.lang.IllegalStateException - Error reading from input
Parser Configuration: CsvParserSettings:
Auto configuration enabled=true
Auto-closing enabled=true
Autodetect column delimiter=true
Autodetect quotes=true
Column reordering enabled=true
Delimiters for detection=[]
Empty value=null
Escape unquoted values=false
Header extraction enabled=true
Headers=null
Ignore leading whitespaces=true
Ignore leading whitespaces in quotes=false
Ignore trailing whitespaces=true
Ignore trailing whitespaces in quotes=false
Input buffer size=1048576
Input reading on separate thread=false
Keep escape sequences=false
Keep quotes=false
Length of content displayed on error=-1
Line separator detection enabled=true
Maximum number of characters per column=-1
Maximum number of columns=1000000
Normalize escaped line separators=true
Null value=null
Number of records to read=all
Processor=....UnivocityDelimitedInputStreamParser$$anon$1
Restricting data in exceptions=false
RowProcessor error handler=null
Selected fields=none
Skip bits as whitespace=true
Skip empty lines=true
Unescaped quote handling=nullFormat configuration:
CsvFormat:
Comment character=#
Field delimiter=,
Line separator (normalized)=\n
Line separator sequence=\n
Quote character="
Quote escape character="
Quote escape escape character=null
Internal state when error was thrown: line=0, column=0, record=0
com.univocity.parsers.common.AbstractParser.handleException(AbstractParser.java:398)
com.univocity.parsers.common.AbstractParser.beginParsing(AbstractParser.java:273)
com.univocity.parsers.common.AbstractParser.parse(AbstractParser.java:128)
com.univocity.parsers.common.AbstractParser.parse(AbstractParser.java:755)
....UnivocityDelimitedInputStreamParser.parse(UnivocityDelimitedInputStreamParser.scala:82)
....ParsingActor$$anonfun$receive$1.applyOrElse(ParsingActor.scala:78)
akka.actor.Actor.aroundReceive(Actor.scala:539)
akka.actor.Actor.aroundReceive$(Actor.scala:537)
....ParsingActor.aroundReceive(ParsingActor.scala:55)
akka.actor.ActorCell.receiveMessage(ActorCell.scala:614)
akka.actor.ActorCell.invoke(ActorCell.scala:583)
akka.dispatch.Mailbox.processMailbox(Mailbox.scala:268)
akka.dispatch.Mailbox.run(Mailbox.scala:229)
akka.dispatch.Mailbox.exec(Mailbox.scala:241)
akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
which is caused by:
Caused by: java.io.IOException: Stream closed
when I don't set the char encoding for a CsvParser. Only setting the encoding stopped this from occurring,
setReadInputOnSeparateThread(false)
did not, as was mentioned in #194 . My CsvParser setup looks like:
private def getParser(rowProcessor: RowProcessor): CsvParser = {
val parserSettings = new CsvParserSettings()
parserSettings.detectFormatAutomatically()
parserSettings.setMaxColumns(maxColumns)
parserSettings.setMaxCharsPerColumn(maxCharsPerColumn)
parserSettings.setProcessor(rowProcessor)
parserSettings.setReadInputOnSeparateThread(false)
if (hasHeaders) {
parserSettings.setHeaderExtractionEnabled(hasHeaders)
}
new CsvParser(parserSettings)
}
val parser = getParser(rowProcessor)
parser.parse(inputStream)
I am using version 2.9.0, and am yet to see the issue when I set the encoding with parser.parse(inputStream, "UTF8"). Please let me know if any additional info would be helpful or perhaps was some configuration error I made.
The text was updated successfully, but these errors were encountered:
Thank you for reporting the bug. I was able to reproduce it consistently and I find it incredible that no one has reported that one before you. Anyway, it's been fixed and I'm releasing a 2.9.1-SNAPSHOT build now which you can use to test. Thank you for using our parsers!
I can't reliably reproduce the issue, but I am frequently getting this exception:
which is caused by:
when I don't set the char encoding for a CsvParser. Only setting the encoding stopped this from occurring,
did not, as was mentioned in #194 . My CsvParser setup looks like:
I am using version 2.9.0, and am yet to see the issue when I set the encoding with
parser.parse(inputStream, "UTF8")
. Please let me know if any additional info would be helpful or perhaps was some configuration error I made.The text was updated successfully, but these errors were encountered: