mito icon indicating copy to clipboard operation
mito copied to clipboard

When changing a column datatype, if you have incorrect type data in the column Mito gives a really unhelpful message

Open twelsh37 opened this issue 2 years ago • 1 comments

Describe the bug When changing a column datatype, if you have the incorrect type data in the column Mito pops up the "Invalid Type Change" modal. The message shows that Mito knows there is an error but does not show you where this is in the column.

As Mito only shows the first 1500 cells, if your error is after that cut off you can only find it by using filtering. As you can see my error is in row 1193, but I knew what I was looking for. image

To Reproduce Steps to reproduce the behavior:

  1. Create a column of strings, insert numbers, but in one row enter a dash

  2. Change the dict to a Pandas dataframe df = pd.DataFrame.from_dict(dict_1)

  3. Read the dataframe into Mito mitosheet.sheet(df)

  4. Click on str and use the task pane to change from a str to an int and you will receive the error

  5. See error

Please include the relevant dataset if the bug you encountered is dataset specific. Make sure to anonymize the data properly. Data I used for my example dict_1 = {'col1': {0: '1', 1: '2', 2: '3', 3: '4', 4: '5', 5: '6', 6: '-', 7: '8', 8: '9', 9: '10' }}

image

Expected behavior I would like to be pointed to the row where the error occured

Desktop (please complete the following information):

  • OS: e.g. Windows 10
  • Browser: Chrome
  • Mito Version 0.1.388

Additional context Add any other context about the problem here.

twelsh37 avatar Mar 04 '22 06:03 twelsh37

@twelsh37 thanks for the bug report! This is certainly not great behavior. It seems like potential solutions here:

  1. Mito points you to the row (tough, if it is rows > 1500)
  2. Mito displays all of the failing points
  3. Mito displays the first failing point

I think (1) requires a bit more architectural changes that we would want. @aarondr77 any thoughts on how you think this sort of error would fit into the app?

As a note - this is the sort of error that seems so much more useful than the traceback (which IMO, will pretty much never be useful to users, given how wrapped it is in Mito's codebase).

naterush avatar Mar 04 '22 16:03 naterush