Graceful error handling for mis-named datamap csv headers #10

Closed
opened 2020-09-10 12:31:49 +00:00 by yulqen · 4 comments
yulqen commented 2020-09-10 12:31:49 +00:00 (Migrated from github.com)

More error handling you could try with the same set of documents is when the datamap.cvs has incorrect headings. E.g. type something other than 'cell_ref' in column A heading. This will also cause a crash.
Cheers, Will.

Originally posted by @banillie in https://github.com/yulqen/datamaps/issues/9#issuecomment-689384783

More error handling you could try with the same set of documents is when the datamap.cvs has incorrect headings. E.g. type something other than 'cell_ref' in column A heading. This will also cause a crash. Cheers, Will. _Originally posted by @banillie in https://github.com/yulqen/datamaps/issues/9#issuecomment-689384783_
banillie commented 2021-03-15 15:48:46 +00:00 (Migrated from github.com)

as above datamap.csv heading needs to be cellreference exactly or causes a crash.

It would prob be best to actually change the requirement to cell_reference to be consistent with the other headers.

as above datamap.csv heading needs to be `cellreference` exactly or causes a crash. It would prob be best to actually change the requirement to `cell_reference` to be consistent with the other headers.
yulqen commented 2021-03-16 18:58:41 +00:00 (Migrated from github.com)

Looking at the code, cell_reference , cell_ref, cellref, cellreference should all work.

github.com/yulqen/bcompiler-engine@414a172992/engine/utils/extraction.py (L383)
_good_cellref = ["cell_reference", "cell_ref", "cellref", "cellreference"]

Will have to run some tests if you're seeing a problem - or put up the stacktrace so I can see what's going on.

Looking at the code, `cell_reference` , `cell_ref`, `cellref`, `cellreference` should all work. https://github.com/yulqen/bcompiler-engine/blob/414a1729928942d2bdde48e5cb743c4a80b687b1/engine/utils/extraction.py#L383 ` _good_cellref = ["cell_reference", "cell_ref", "cellref", "cellreference"]` Will have to run some tests if you're seeing a problem - or put up the stacktrace so I can see what's going on.
banillie commented 2021-03-17 13:00:56 +00:00 (Migrated from github.com)

Ok. I've tried those above combos and they work fine. I can't remember what the combo was that caused a crash, but it will have been different to those of course. so leave for now. thanks.

Ok. I've tried those above combos and they work fine. I can't remember what the combo was that caused a crash, but it will have been different to those of course. so leave for now. thanks.
yulqen commented 2021-04-02 14:56:29 +00:00 (Migrated from github.com)

I think there are enough options the user can choose to name the field here, so closing.

I think there are enough options the user can choose to name the field here, so closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
yulqen/datamaps#10
No description provided.