I'm trying to use pyinstaller to create an executable for my project, but when it hits the "playsound" function, outputs the error below. This only happens with the executable and not the regular code.
Error 263 for command:
open success.mp3
The specified device is not open or is not recognized by MCI.
Error 263 for command:
close success.mp3
The specified device is not open or is not recognized by MCI.
Failed to close the file: success.mp3
Exception in Tkinter callback
Traceback (most recent call last):
File "tkinter\__init__.py", line 1892, in __call__
File "Main.py", line 137, in <lambda>
File "Main.py", line 122, in loop
File "Main.py", line 109, in loopOver
File "playsound.py", line 72, in _playsoundWin
File "playsound.py", line 64, in winCommand
playsound.PlaysoundException:
Error 263 for command:
open success.mp3
The specified device is not open or is not recognized by MCI.
This is the code running playsound:
from playsound import playsound
playsound('success.mp3', False)
the file structure looks like this:
and this is the command i'm using to compile:
pyinstaller main.spec
which has all modifications I need inside the .spec file
I'll be honest i'm completely stumped by this so I was hoping someone may have run into something similar in the past and can help me out? Thanks in advance!