zlib.error
Prev: zlib.decompressobj | Up: zlib
Rel: zlib.adler32, zlib.compress, zlib.compressobj, zlib.crc32
Ref: docs.python.org โ zlib.error
Tags: #public #python3 #stdlib #zlib
Import
import zlib
from zlib import error
Signature & Overview
zlib.error(...)
zlib.error class.
Methods & Attributes
error.add_note(self, note, /)โ Add a note to the exceptionerror.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import zlib
try:
zlib.decompress(b'invalid')
except zlib.error:
assert True
Gotchas
- Raised on corrupt/truncated zlib streams or wrong
wbits.
REPL Inspect
from zlib import error
help(error)
Linked from
Related notes
- tuts/python3/stdlib_module/zlib/decompressobj Linked here; links to this page; shared tags: #stdlib, #zlib
- tuts/python3/stdlib_module/zlib Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/zlib/adler32 Linked here; shared tags: #stdlib, #zlib
- tuts/python3/stdlib_module/zlib/compress Linked here; shared tags: #stdlib, #zlib
- tuts/python3/stdlib_module/zlib/compressobj Linked here; shared tags: #stdlib, #zlib
- tuts/python3/stdlib_module/zlib/crc32 Linked here; shared tags: #stdlib, #zlib
- tuts/python3/stdlib_module/zlib/decompress shared tags: #stdlib, #zlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib