wave.Error
Up: wave | Next: wave.open
Rel: wave.open, wave.Wave_read, wave.Wave_write
Ref: docs.python.org โ wave.Error
Tags: #public #python3 #stdlib #wave
Import
import wave
from wave import Error
Signature & Overview
wave.Error(...)
wave.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 io, wave
try:
with wave.open(io.BytesIO(b'not wav'), 'rb'):
pass
except wave.Error:
assert True
Gotchas
- Raised on non-WAV files or unsupported compressed WAV codecs.
REPL Inspect
from wave import Error
help(Error)
Linked from
Related notes
- tuts/python3/stdlib_module/wave/open Linked here; links to this page; shared tags: #stdlib, #wave
- tuts/python3/stdlib_module/wave/Wave_read Linked here; links to this page; shared tags: #stdlib, #wave
- tuts/python3/stdlib_module/wave/Wave_write Linked here; links to this page; shared tags: #stdlib, #wave
- tuts/python3/stdlib_module/wave Linked here; links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib
- tuts/c/stdlib/ctype shared tags: #stdlib
- tuts/c/stdlib/ctype/isalpha shared tags: #stdlib