nbdev icon indicating copy to clipboard operation
nbdev copied to clipboard

User-friendly error messages

Open seeM opened this issue 3 years ago • 1 comments

We don't often catch exceptions and reraise errors with more specific and friendly messages. My personal preference is for verbose error messages written in a conversational tone with as much useful info for debugging as possible.

I'd like to use this issue to track specific cases of unhelpful error messages, which can each be tracked in their own issue:

  • [ ] #1169

seeM avatar Oct 19 '22 02:10 seeM

I'm glad this issue exists. What came to mind right now, after another quick session of trying to parse error messages, is that a few generic validators that can run on some of the nbdev commands could be really useful, i.e.:

  1. settings.ini validator - is it well formated (i.e. before running nbdev_export, nbdev_clean)
  2. a notebook validator - is it a valid JSON? is each cell valid (i.e. catch python cells with indented blocks that are empty.

I imagine more things can be addressed this way (i.e. maybe a utility to test image tag in markdown cells before running docs?).

If that approach seems amenable, I wouldn't mind looking into 1 in the near term, if no one else is planning to do so. I can try to tackle 2 as well afterwards but I don't have much experience parsing ipynb files so someone else may be at an advantage :P

VehpuS avatar Jan 24 '23 08:01 VehpuS