I 'm tryin to use an mp3 in my app.
This is how:
But it' s not working.
What am I doing wrong?
This is how:
def _response_to_alert(self): if getattr(sys, 'frozen', False): # we are running in a bundle bundle_dir = sys._MEIPASS else: # we are running in a normal Python environment bundle_dir = os.path.dirname(os.path.abspath(file)) file = os.path.join(bundle_dir, 'foghorn.mp3') pygame.mixer.music.load(file) pygame.mixer.music.play(-1)In my spec file, I have: datas= [('betws.ui','.'), ('foghorn.mp3', '.')],
But it' s not working.
What am I doing wrong?