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

AttributeError: 'NoneType' object has no attribute 'props' #142

Open
frozen905 opened this issue Apr 24, 2023 · 2 comments
Open

AttributeError: 'NoneType' object has no attribute 'props' #142

frozen905 opened this issue Apr 24, 2023 · 2 comments

Comments

@frozen905
Copy link

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.
>>>
@frozen905
Copy link
Author

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'
>>>

@frozen905 frozen905 changed the title Error output after installation on Android / Termux AttributeError: 'NoneType' object has no attribute 'props' Apr 24, 2023
@TaylorSMarks
Copy link
Owner

TaylorSMarks commented Apr 25, 2023 via email

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

2 participants