all Python 3binasciiexception
binascii.Incomplete
exceptions
The 'incomplete data' exception, meant for cases where you should read more data and retry. It inherits from Exception, not ValueError.
Syntax
except binascii.Incomplete:
The class is still in the module, but in Python 3.11 its last source went away along with a2b_hqx and the other BinHex functions: no binascii function raises it any more. Catching it in new code is pointless; in old code it hints at calls to the removed functions. Unlike binascii.Error, except ValueError does not catch it.
Examples
import binascii
print(issubclass(binascii.Incomplete, ValueError)) # → False
print(binascii.Incomplete.__mro__[1].__name__) # → Exception
See also
Open in the full glossarydocs.python.orgReport an inaccuracy