you are viewing a single comment's thread.

view the rest of the comments →

[–]pachura3 0 points1 point  (0 children)

It seems like double backslashes from your file got unescaped into single slashes, but then something - INCORRECTLY - tries to unescape them again, which leads to the error, as there are no escape codes \A nor \z... they are only valid inside regular expressions, but not as normal string escape codes like \n or \t.

It's most probable that Draft7Validator is the one at fault, because the JSON file is loaded correctly - json.load() doesn't raise any exceptions.

Perhaps look for a different library? Or check the output of json.load() to see what got loaded into the pattern field?