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

Class XMLSchemaEncodeError

xmlschema/validators/exceptions.py:415–435  ·  view source on GitHub ↗

Raised when an object is not encodable to an XML data string. :param validator: the XSD validator. :param obj: the not validated XML data. :param encoder: the XML encoder. :param reason: the detailed reason of failed validation. :param source: the XML resource that contains

Source from the content-addressed store, hash-verified

413
414
415class XMLSchemaEncodeError(XMLSchemaValidationError):
416 """
417 Raised when an object is not encodable to an XML data string.
418
419 :param validator: the XSD validator.
420 :param obj: the not validated XML data.
421 :param encoder: the XML encoder.
422 :param reason: the detailed reason of failed validation.
423 :param source: the XML resource that contains the error.
424 :param namespaces: is an optional mapping from namespace prefix to URI.
425 """
426 _message = 'failed encoding {} with'
427
428 def __init__(self, validator: Union['XsdValidator', Callable[[Any], None]],
429 obj: Any,
430 encoder: Any,
431 reason: Optional[str] = None,
432 source: Optional[Any] = None,
433 namespaces: Optional[NsmapType] = None) -> None:
434 super().__init__(validator, obj, reason, source, namespaces)
435 self.encoder = encoder
436
437
438class XMLSchemaChildrenValidationError(XMLSchemaValidationError):

Callers 3

test_encode_errorMethod · 0.90
iter_encodeMethod · 0.85
encode_errorMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_encode_errorMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…