You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve wave module error messages to include the offending value #149306
The wave module currently raises errors without the offending value:
wave.Error: bad # of channels
wave.Error: bad sample width
wave.Error: bad frame rate
When values come from variables, configuration, or parsed data, the
traceback shows the call site but not the actual offending value. For Wave_read, the values are parsed from the WAV file header and never
appear in the traceback at all.
Reproduction
importwave, iowave.open(io.BytesIO(), 'wb').setframerate(-1)
# wave.Error: bad frame rate
Activity
pythongh-149306: Improve error messages in wave module to include the…
pythongh-149306: Improve error messages in wave module to include the…
Merge remote-tracking branch 'upstream/main' into pythongh-149306-wav…
rhettinger commentedon May 3, 2026
I'm concerned that these LLM created issues are of little value.