playsound
playsound copied to clipboard
AttributeError: 'NoneType' object has no attribute 'props'
Hello friends,
I have installed playsound however when I try to play a simple test.wav file, I get a big spam of errors. I am a novice user and do not know how to troubleshoot this.
Thank you
>>> from playsound import playsound
>>> playsound('test.wav')
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/playsound-1.3.0-py3.11.egg/playsound.py", line 244, in <module>
playsound(argv[1])
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/playsound-1.3.0-py3.11.egg/playsound.py", line 146, in _playsoundNix
gi.require_version('Gst', '1.0')
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/gi/__init__.py", line 126, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gst not available
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/playsound-1.3.0-py3.11.egg/playsound.py", line 237, in <lambda>
playsound = lambda sound, block = True: _playsoundAnotherPython('/usr/bin/python3', sound, block, macOS = False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/playsound-1.3.0-py3.11.egg/playsound.py", line 212, in _playsoundAnotherPython
t.join()
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/playsound-1.3.0-py3.11.egg/playsound.py", line 201, in join
raise self.exc
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/playsound-1.3.0-py3.11.egg/playsound.py", line 194, in run
self.ret = self._target(*self._args, **self._kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/playsound-1.3.0-py3.11.egg/playsound.py", line 209, in <lambda>
t = PropogatingThread(target = lambda: check_call([otherPython, playsoundPath, _handlePathOSX(sound) if macOS else sound]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '/data/data/com.termux/files/usr/lib/python3.11/site-packages/playsound-1.3.0-py3.11.egg/playsound.py', 'test.wav']' returned non-zero exit status 1.
>>>
Python Discord informed me this was related to something called gstreamer, which I was able to install with no problems by doing 'pkg install gstreamer'
Error output is now reduced to this one last remaining error:
>>> from playsound import playsound
>>> playsound('test.wav')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/playsound-1.3.0-py3.11.egg/playsound.py", line 158, in _playsoundNix
playbin.props.uri = 'file://' + pathname2url(path)
^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'props'
>>>
Linux is barely/poorly supported by playsound.Android is not supported at all. I don’t know where one would begin - I don’t think Travis can run instances of Android to run tests against, can it?Anyways, I provided you with playsound. You should now provide improvements, not requests for more from me. I really aught to just disable reporting issues on GitHub since people only misuse it.Sent from my iPhoneOn Apr 24, 2023, at 17:50, frozen @.***> wrote: Python Discord informed me this was related to something called gstreamer, which I was able to install with no problems by doing 'pkg install gstreamer' Error output is now reduced to this one last remaining error:
from playsound import playsound playsound('test.wav') Traceback (most recent call last): File "
", line 1, in File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/playsound-1.3.0-py3.11.egg/playsound.py", line 158, in _playsoundNix playbin.props.uri = 'file://' + pathname2url(path) ^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'props'
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>