0

I wrote a code that works perfectly on Ubuntu but not working on Windows. Here's the code :

from playsound import playsound

playsound("sound")

And the error :

Traceback (most recent call last):
  File "test.py", line 3, in <module>
    playsound("sound")
  File "D:\Programmes\Miniconda3\envs\marmodio\lib\site-packages\playsound.py", line 35, in _playsoundWin
    winCommand('open "' + sound + '" alias', alias)
  File "D:\Programmes\Miniconda3\envs\marmodio\lib\site-packages\playsound.py", line 30, in winCommand
    '\n    ' + errorBuffer.value.decode())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 4: invalid continuation byte

Why is there a difference between Ubuntu and Windows and how can I fix it?

Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
SashimiDélicieux
  • 476
  • 1
  • 5
  • 17

1 Answers1

1

it says the file is sound but it needs to be something like sound.mp3

Enzo TDZ
  • 48
  • 6