Moved from #134
One of my documents contains a field, which is checked against a pattern.
When I put a UTF-8 character into the field, I should have gotten a ValidationError?, but I got, when calling pyxb.ValidationError?.details():
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pyxb/exceptions_.py", line 183, in details
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 116: ordinal not in range(128)
My calling code:
xml = file(args.exp_file).read()
exp = expxml.CreateFromDocument(xml)
except pyxb.ValidationError as e:
log.error("Error validating %s: %s"
% (args.exp_file, e.details()))
I'm using Python 2.7. I don't think this is a Python issue.