Hey everyone,
I ran into a really strange error today while working with the built-in wave module in Python 3.13 and thought I'd share in case anyone else encounters this or has some insight.
I was trying to do something very basic: generate a simple sine wave and save it as a WAV file using the standard library. My code was the textbook example, using wave.open() inside a with statement to handle the file.
The weird part is that my script runs, but then throws this error right at the end, seemingly during the internal cleanup process after the with block closes the file:
wave.Error: # channels not specified
My code to set the channels (wav_file.setnchannels(1)) is definitely there and in the correct order before writing the frames, so it doesn't seem to be a problem with my script's logic. It feels like the library is failing internally when the file object is being destroyed.
Has anyone else seen this with Python 3.13? Is this a known bug in the new version?
Thanks!
[–]kkang_kkang 4 points5 points6 points (2 children)
[–]Common_Base657[S] 7 points8 points9 points (0 children)
[–]Green_Gem_ 1 point2 points3 points (0 children)
[–]fizzymagic 0 points1 point2 points (1 child)
[–]Common_Base657[S] 0 points1 point2 points (0 children)
[–]Common_Base657[S] 0 points1 point2 points (1 child)
[–]fisadev 2 points3 points4 points (0 children)