42BV / CSVeed

Light-weight, easy-to-use Java-based CSV utility
Apache License 2.0
100 stars 22 forks source link

Cannot convert empy cell to number #80

Open arnaudroger opened 7 years ago

arnaudroger commented 7 years ago

Hi there, I'm trying to integrate your csv reader in https://github.com/arnaudroger/mapping-benchmark/tree/master/sfm-csv

it tries to parse

http://www.maxmind.com/download/worldcities/worldcitiespop.txt.gz to
https://github.com/arnaudroger/mapping-benchmark/blob/master/sfm-csv/src/main/java/org/simpleflatmapper/City.java

but fails on all the other parser works well with that.

Exception in thread "main" org.csveed.report.CsvException: Problem converting cell index 5 (E) [] to population: java.lang.Number 2: ad,aixas,Aix�s,06,,42.4833333,1.4666667\n 2: ^
at org.csveed.bean.AbstractMapper.setBeanProperty(AbstractMapper.java:90) at org.csveed.bean.AbstractMapper.convert(AbstractMapper.java:64) at org.csveed.bean.BeanReaderImpl.readBean(BeanReaderImpl.java:69) at org.csveed.api.CsvClientImpl.readBean(CsvClientImpl.java:123) at org.simpleflatmapper.CSVeedParserBenchmark.main(CSVeedParserBenchmark.java:57) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)