Error While Using Playsound

Question:
I am getting this error if you can help, please do!
Error:


Files:
image

Code:

  elif person.lower() == 'change' or person.lower() == 'change1' or person.lower() == 'change2':
    p14 = '[CHANGE THIS]'
    typewriter_print(p14)
    playsound('5.mp3')
1 Like

Ensure that you are using the playsound library correctly in your code. The correct usage typically involves providing the path to an audio file that you want to play. For example:

from playsound import playsound

audio_file = "path/to/your/audio/file.mp3"

playsound(audio_file)

I have the import and I have this:

  elif person.lower() == 'taco' or person.lower() == 'tacos' or person.lower() == 't':
    p14 = 'ITS RAINING TACOS'
    typewriter_print(p14)
    audio_file = '5.mp3'
    playsound(audio_file)

But it’s still just not working. Any other suggestions?

I would recommend not using audio on Replit without a website, it usually doesn’t work out well.