0

I am trying to use pyinstaller to convert my app into a .exe file. The conversion to .exe works, but when I run the .exe, I get an error from my music script. I believe the problem is that the folder and sounds inside the folder are not being used in the conversion. I believe the problem is how I am calling each sound. I think I need to import the directory and call the sound that way, but I am not sure how to do that. (the script runs fine when I call the sounds this way, just when I convert to .exe) This is how I am calling each sound as of right now:

def music():
mixer.init()
music = pygame.mixer.Sound('sounds/music.wav')
#mixer.music.load()
music.set_volume(0.2)
music.play(-1)
martineau
  • 112,593
  • 23
  • 157
  • 280

0 Answers0