0

'TypeError: 'module' object is not callable' while running simple playsound error in python 3.11.4 version

I tried everything according to different suggestions like ~ installed lower version of playsound i.e 1.2.2 which didn't install in the first place. ~ changed .mp3 file to wav file ~ also tried wave module instead of playsound

expectation was to play a song simply

  • Are you doing something like `playsound('blah.mp3')`? If so, you have two choices: either `import playsound` then `playsound.playsound('blah.mp3')`, or otherwise `from playsound import playsound` then `playsound('blah.mp3')`. Avoid mixing the two styles. – slothrop Jul 14 '23 at 15:10

1 Answers1

1

without a sample of your code it's going to be difficult to help.

generally speaking a 'TypeError: 'module' object is not callable' means you are trying to call a module like a function. Maybe you are calling the function without parentheses?