civisanalytics / civis-python

Civis API Python Client
BSD 3-Clause "New" or "Revised" License
34 stars 26 forks source link

[CIVP-22464] BUG Better error message when CSV preprocessing fails in `civis_file_to_table` #428

Closed jacksonlee-civis closed 2 years ago

jacksonlee-civis commented 2 years ago

civis.io.civis_file_to_table assumes the internal CSV preprocessing jobs always return run outputs, but this assumption breaks down if CSV preprocessing fails with no run outputs and therefore leads to an uninformative "list index out of bounds" error. This PR handles this error and provides a better error message to aid debugging.