Skip to content
← Back to Community
Can't get music running on Pygame
Profile icon
Rishan001

See my repl, I want to add some music to it (for testing we're trying the TETRIS theme tune, but we (@220208 and I) get the following error:
pygame.error: ALSA: Couldn't open audio device: No such file or directory

Run the REPL to see the log. I think it's because we have to set up the speaker drivers, and that's all in the REPL.IT headquarters. How do we fix this?

Voters
Profile icon
PeytonWard1
Profile icon
220208
Profile icon
Rishan001
Comments
hotnewtop
Profile icon
Coder100

you can't play music on replit.
You must use the replit package:
https://docs.repl.it/repls/audio

Profile icon
Rishan001

@Coder100 Ah, it works now! Thanks for the reply! I never knew there was a replit package!

Profile icon
OldWizard209

@220208 @Rishan001 I think try doing this in a Pygame Repl rather than a normal repl...:

image

If that doesn't work and your code is correct, then replit is having a few problems, report it here:
https://replit.com/bugs/
Note: If I answered your question in the other post, don't mark this as correct @Rishan001

Profile icon
Rishan001

@OldWizard209 We’re using a Pygame REPL, I’ll just report it now

Profile icon
220208

We would appreciate any help!

Profile icon
PeytonWard1

how do i get music to run in the background in my car sim in pygame