clkhash icon indicating copy to clipboard operation
clkhash copied to clipboard

create_clk_from_csv cannot handle empty csv file

Open wilko77 opened this issue 6 years ago • 0 comments

the error you will get looks like this:

---------------------------------------------------------------------------
StopIteration                             Traceback (most recent call last)
<ipython-input-12-d85f4714107b> in <module>()
      1 from clkhash import clk
----> 2 hashed_data_a = clk.generate_clk_from_csv(a_csv, ('key1', 'key2'), schema, validate=False)

~/Code/clkhash/clkhash/clk.py in generate_clk_from_csv(input_f, keys, schema, validate, header, progress_bar)
     90
     91     if header:
---> 92         column_names = next(reader)
     93         if header != 'ignore':
     94             validate_header(schema.fields, column_names)

StopIteration:

And that's pretty rubbish.

Aha! Link: https://csiro.aha.io/features/ANONLINK-35

wilko77 avatar Apr 18 '18 05:04 wilko77