I recently began work on a game for my daughter to help with learning words. I am moving along and decided to create the executable file (I'll done this with many other games). This game is somewhat different due to sounds and music. I have tried everything I can think of, searched everything I can think of etc. This is the error CMD reports, the error is referring to a sound file. I have tried adding the file directly with --add-data
I have tried placing the executable in the same directory as the sound file (which shouldn't be needed since it should bundle it already). The script runs absolutely fine otherwise (from CMD etc.) ANY IDEAS??
C:\Users\launc\Desktop\Coding\Games\g_sight_words\dist>sight_words.exe
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "sight_words.py", line 5, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\users\launc\appdata\local\programs\python\python37-32\lib\site-
packages\PyInstaller\loader\pyimod03_importers.py", line 627, in
exec_module
exec(bytecode, module.__dict__)
File "settings.py", line 21, in <module>
pygame.error: Unable to open file 'the.wav'
[9892] Failed to execute script sight_words