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
Consider a Python script with the following content:
importwavetry:
withwave.open('/unwritable_path.wav', 'wb') asf:
pass# Not reachable, open() should have raised by nowexceptPermissionError:
pass
When executed in a Python interpreter, an exception is raised on exit from Wave_write.__del__():
Exception ignored in: <function Wave_write.__del__ at 0x000001CA3478B740>
Traceback (most recent call last):
File "C:\Python313\Lib\wave.py", line 469, in __del__
self.close()
File "C:\Python313\Lib\wave.py", line 592, in close
if self._file:
AttributeError: 'Wave_write' object has no attribute '_file'
Bug report
Bug description:
Consider a Python script with the following content:
When executed in a Python interpreter, an exception is raised on exit from
Wave_write.__del__():CPython versions tested on:
3.12, 3.13
Operating systems tested on:
Linux, Windows
Linked PRs