Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sound not playing at all with no error #128

Open
TheMemeSniper opened this issue Oct 5, 2022 · 3 comments
Open

Sound not playing at all with no error #128

TheMemeSniper opened this issue Oct 5, 2022 · 3 comments

Comments

@TheMemeSniper
Copy link

I am trying to use the playsound module with the following code and filesystem:

playsound.playsound("assets/music/maintheme.mp3",False)
Development
     Nodebreach - main.py
          assets
               music
                    maintheme.mp3

Yet when I execute main.py, no sound plays and no error appears.

I have already installed Gstreamer through apt.

@tobymac208
Copy link

I am having this issue on my Arch installation. I had to comment out any usage of the playsound module to get the rest of my code working again.

@TheMemeSniper
Copy link
Author

hm, maybe i should change it to just not playing considering Crostini uses a Debian image

@TheMemeSniper TheMemeSniper changed the title Sound not playing on Crostini/Linux for Chromebook Sound not playing at all with no error Oct 24, 2022
@liudonghua123
Copy link

Maybe I have a similar issue, I have to wait a few seconds for the sound playing. And I have to add ./ to the path of the sound file.

D:\Downloads>python
Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from playsound import playsound
>>> playsound("Backstreet Boys - As Long As You Love Me.mid")

    Error 259 for command:
        play "C:\Users\LIUD~1.H\AppData\Local\Temp\PS96ia0aqm.mid" wait
    The driver cannot recognize the specified command parameter.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python311\Lib\site-packages\playsound.py", line 44, in _playsoundWin
    _playsoundWin(tempPath, block)
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python311\Lib\site-packages\playsound.py", line 73, in _playsoundWin
    winCommand(u'play {}{}'.format(sound, ' wait' if block else ''))
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python311\Lib\site-packages\playsound.py", line 64, in winCommand
    raise PlaysoundException(exceptionMessage)
playsound.PlaysoundException:
    Error 259 for command:
        play "C:\Users\LIUD~1.H\AppData\Local\Temp\PS96ia0aqm.mid" wait
    The driver cannot recognize the specified command parameter.
>>> playsound("./Backstreet Boys - As Long As You Love Me.mid")
...
>>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants