import validx as v
try:
v.Str(options=["a"])("b")
except v.exc.ValidationError as e:
v.exc.format_error(e)
Traceback (most recent call last):
File "test.py", line 4, in <module>
v.Str(options=["a"])("b")
File "src/validx/cy/chars.pyx", line 135, in validx.cy.chars.Str.__call__
validx.exc.errors.OptionsError: <OptionsError(expected=frozenset({'a'}), actual='b')>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 6, in <module>
v.exc.format_error(e)
File "validx/exc/formatter.py", line 72, in __call__
result.append((context, f[1].format(e)))
TypeError: 'frozenset' object is not subscriptable