Ask coding questions

← Back to all posts
Playsound error?
stepulazapletal (0)

okay im trying to playsound in my repl but, every time i try iget this error:

Traceback (most recent call last):
  File "main.py", line 3, in <module>
    ps("erro.wav")
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/playsound.py", line 91, in _playsoundNix
    import gi
ModuleNotFoundError: No module named 'gi'

Any suggestions?

Comments
hotnewtop
Coder100 (17111)

Use replit audio instead, any other library will not work.
https://docs.replit.com/repls/audio

stepulazapletal (0)

@Coder100 okay, it is in there but, i want only to play the sound. I dont want it to heve like the pause function, volume, loop can you please edit it for me?

LegendaryWolf (701)

rename the main_.py file as main.py. that may or may not work ig...

stepulazapletal (0)

@LegendaryWolf that file owner is my sister.
my file is main.py

LegendaryWolf (701)

it doesn't work for .wav files. ig only .mp3 files are supported. try converting the erro.wav file to erro.mp3 :) hope that will work