strictyaml icon indicating copy to clipboard operation
strictyaml copied to clipboard

Incorrect error location reported

Open kshpytsya opened this issue 8 years ago • 1 comments

strictyaml version 0.4.1

import strictyaml as sy sy.load("1: a", sy.MapPattern(sy.Int(), sy.Int()))

 YAMLValidationError: when expecting an integer
 found non-integer
 in "<unicode string>", line 1, column 1:
     '1': a
     ^

One would expect "column 6" (i.e. the "a" character) being marked as an error location.

kshpytsya avatar Feb 03 '17 19:02 kshpytsya

Yes, this is the result of the way I arranged the location handling - it could only really do lines - not columns. Since untangling that would be a hassle and because it reported a clear actionable error that was sufficient for my needs I left it in place. This does need to be fixed though.

crdoconnor avatar Feb 03 '17 20:02 crdoconnor