[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pyg_mixer.music.load doesn't take non ascii chars



Bo Jangeborg wrote:
file_path = "07-Boabdil, Bulerías.ogg"
fi = open(file_path, 'rb').read()
pygame.mixer.music.load(fi)

But that gets me the Error:
"File path 'OggS' contains null characters"

music.load() expects to be passed the name of a file,
not the contents of the file. Just do this:

file_path = "07-Boabdil, Bulerías.ogg"
pygame.mixer.music.load(file_path)

--
Greg