quaerite icon indicating copy to clipboard operation
quaerite copied to clipboard

Extra spaces at the end of judgements file confuse CSVRecord

Open sstults opened this issue 3 years ago • 2 comments

I'm not sure if this should be considered an issue with Quaerite or with the application that generated the judgements file, so I'm logging the issue here in case we want to guard against it. Feel free to close with wontfix!

The CSV terminated with two CRLFs instead of just one, which throws:

Exception in thread "main" java.lang.IllegalArgumentException: Index for header 'docid' is 1 but CSVRecord only has 1 values!
	at org.apache.commons.csv.CSVRecord.get(CSVRecord.java:129)
	at org.tallison.quaerite.cli.QueryLoader.loadJudmentsWithoutId(QueryLoader.java:147)
	at org.tallison.quaerite.cli.QueryLoader.loadJudgments(QueryLoader.java:98)
	at org.tallison.quaerite.cli.QueryLoader.loadJudgments(QueryLoader.java:67)
	at org.tallison.quaerite.cli.RunExperiments.main(RunExperiments.java:159)
	at org.tallison.quaerite.cli.QuaeriteCLI.main(QuaeriteCLI.java:44)

Easy enough to manually fix in the file, and will look into fixing the CSV exporter.

sstults avatar May 20 '21 21:05 sstults

This is totally a Quepid issue in not being smart and they should fix it!

epugh avatar May 20 '21 21:05 epugh

@epugh Can we close this issue?

tballison avatar Dec 13 '21 16:12 tballison