[False positive in Pycharm] Python version 3.12 does not have module winsound

I know that winsound is obviously for windows. Using the module works but in PyCharm I’m getting this warning and I want to get rid of it without disabling, “Code is incompatible with specific Python versions.” I don’t get this warning in 3.11.

Please provide the full error message include the traceback maybe that will explain why PyCharm affecting this.

it is a false warning that PyCharm is generating. winsound.PlaySound(sound = 'Siren.wav', flags = winsound.SND_FILENAME) works just fine. I want to fix the warning in PyCharm.

from winsound import PlaySound, SND_FILENAME


import winsound

both generate the false warning.

This could have been stated more clearly in the title and in the initial message. Also be aware that PyCharm (or any IDE really) is not really a focus point for this discussion forum. Someone might still be able to help you, but being clear about it will improve the chances.

Indeed, this is the Discourse forum for the Python programming language; if you’ve found a false positive bug in the linting feature of a third-party commercial IDE application, that’s something you’ll presumably want to report to them via their relevant support channels instead. Best of luck!

1 Like

Will do, and sorry.