frictionlessdata/tabulator-py

Tabulator should wrap underlaying encoding errors into better error messages

roll opened this issue · 0 comments

roll commented

Overview

E.g. here the encoding was detected not correctly:

  File "/home/roll/projects/tabulator-py/tabulator/parsers/csv.py", line 108, in __prepare_dialect
    sample.append(next(stream))
  File "/home/roll/projects/tabulator-py/.python/lib/python3.7/encodings/cp1254.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 37396: character maps to <undefined>