Description
If a CSV file has a row that has fewer fields than the first "column definition row"... For example...
lastname,firstname,city
yaseen,rahim,RS
ghods,farshid,SF
yen
barr,sharon,PA
Then the cbtransfer CSV importer will throw an exception when it hits the row "yen", as that row has fewer fields (1) than the first field definition row that says there should be 3 fields.
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 530, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 483, in run
self._target(*self.args, **self._kwargs)
File "/Users/steveyen/work/membase/dev/voltron.couchbase/build/membase-cli/pump.py", line 264, in run_worker
source_map, sink_map, self.ctl, curx).run()
File "/Users/steveyen/work/membase/dev/voltron.couchbase/build/membase-cli/pump.py", line 321, in run
rv_batch, batch = self.source.provide_batch()
File "/Users/steveyen/work/membase/dev/voltron.couchbase/build/membase-cli/pump_csv.py", line 84, in provide_batch
doc[field] = number_try_parse(vals[i])
IndexError: list index out of range