Tabs in YAML files are one of the most common errors, and my end users make it all the time depending on their editor. But the error message, while useful to a programmer, is completely bewildering to an end user:
ScannerError: while scanning for the next token found character '\t' that cannot start any token in "<string>", line 91, column 1: 1vDC_on: 'vDC > 15500'
They don't care about scanners and tokens and
\t. What they need to know is that they have a tab character in column 1 of line 91. So I need a way to catch the exception and if it's a tab problem, I need to reformat a useful error message that is more meaningful to end users.
My request is:
- help me figure out how to take a ScannerError object and distinguish between the tab problem and others
- Because this case is so common, I would strongly suggest writing up an example for others to use as well.