This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: winsound module very unstable in Windows 10
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 3.5, Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Ganning Liu, zach.ware
Priority: normal Keywords:

Created on 2016-04-15 03:29 by Ganning Liu, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg263438 - (view) Author: Ganning Liu (Ganning Liu) Date: 2016-04-15 03:29
Cannot using winsound.Beep() in .py file (run as module), get error information like:

Traceback (most recent call last):
  File "C:\Users\liuga\Desktop\sound.py", line 2, in <module>
    winsound.Beep(230,200)
AttributeError: module 'winsound' has no attribute 'Beep'

And also failed in interactive shell occasionally.
msg263440 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2016-04-15 03:41
This looks very like a case of shadowing a standard library module.  Just before your call to Beep(), try "print(winsound.__file__)".  If it's not "C:\SomePathToPython\DLLs\winsound.pyd" (with an appropriate real path in place of "SomePathToPython"), it's the path of the file that you should rename to something other than "winsound.py".
msg263443 - (view) Author: Ganning Liu (Ganning Liu) Date: 2016-04-15 04:29
Thanks Zachary, it's not a bug!
msg263444 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2016-04-15 04:36
Glad I could guide you to a solution :)
History
Date User Action Args
2022-04-11 14:58:29adminsetgithub: 70948
2016-04-15 04:36:06zach.waresetmessages: + msg263444
stage: resolved
2016-04-15 04:29:13Ganning Liusetstatus: pending -> closed

messages: + msg263443
2016-04-15 03:41:08zach.waresetstatus: open -> pending

nosy: + zach.ware
messages: + msg263440

type: compile error -> behavior
resolution: not a bug
2016-04-15 03:29:55Ganning Liucreate