By default, xmlsec library uses LibXML2 error reporting mechanism (thought you might use a custom one if needed). I am not familiar with PyXMLSec but you might want to take a look at how LibXML2 errors are reported. Aleksey