MCPcopy Create free account
hub / github.com/sissaschool/xmlschema / XMLSchemaDecodeError

Class XMLSchemaDecodeError

xmlschema/validators/exceptions.py:392–412  ·  view source on GitHub ↗

Raised when an XML data string is not decodable to a Python object. :param validator: the XSD validator. :param obj: the not validated XML data. :param decoder: the XML data decoder. :param reason: the detailed reason of failed validation. :param source: the XML resource th

Source from the content-addressed store, hash-verified

390
391
392class XMLSchemaDecodeError(XMLSchemaValidationError):
393 """
394 Raised when an XML data string is not decodable to a Python object.
395
396 :param validator: the XSD validator.
397 :param obj: the not validated XML data.
398 :param decoder: the XML data decoder.
399 :param reason: the detailed reason of failed validation.
400 :param source: the XML resource that contains the error.
401 :param namespaces: is an optional mapping from namespace prefix to URI.
402 """
403 _message = 'failed decoding {} with'
404
405 def __init__(self, validator: Union['XsdValidator', Callable[[Any], None]],
406 obj: Any,
407 decoder: Any,
408 reason: Optional[str] = None,
409 source: Optional[Any] = None,
410 namespaces: Optional[NsmapType] = None) -> None:
411 super().__init__(validator, obj, reason, source, namespaces)
412 self.decoder = decoder
413
414
415class XMLSchemaEncodeError(XMLSchemaValidationError):

Callers 4

test_decode_errorMethod · 0.90
decodeMethod · 0.85
raw_decodeMethod · 0.85
decode_errorMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_decode_errorMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…