Q:

pygame.error: Couldn't open mp3

Here's the code for something I was testing out to put in a game I'm creating. I made this code to try to make the music loop over and over again.
Here:
from pygame import mixer

mixer.init()
mixer.music.load('C:\\Users\\owner-\\Dropbox\\Programming\\Zelpha808\\music.mp3')
def play():
    timer = 1 
    mixer.music.play()
    timer = 2
    if timer == 2:
        play()
play()

and the result:
pygame.error: Couldn't open 'C:\Users\owner-\Dropbox\Programming\Zelpha808\music.mp3'

I've seen previous posts about this, except they weren't using the 'music' and the answer ended up telling them to use 'music'. But in this case, I AM using 'music'. So what's wrong with it? And if you can, would this code work? As in would the music play in a loop nonstop? If not, how would I make it loop?

A:

It turns out that the music file is a .wav file... The original file was a .mp3, and it had like 10 seconds of silence at the beginning of it. So I put it in audacity, and cut it out, and I guess it changed it to a .wav file. I feel so stupid hahaha. But that did it, I did mixer.music.load('C:/Users/owner-/Dropbox/Programming/Zelpha808/music.wav').

