AutoGPT
AutoGPT copied to clipboard
playbin.props.uri ... AttributeError: 'NoneType' object has no attribute 'props'
Using the --speak flag breaks the script even with all the requirements. Not sure if this is a bug on linux or perhaps a simple python setup issue, but after some time I haven't been able to fix it. Anyone have any ideas? (note the "Response content: b'{"detail":"Not Found"}' " in the beginning too)
(Auto-GPT) oberon /home/charlton/Auto-GPT [84]>run.sh --debug --speak
All packages are installed.
Debug Mode: ENABLED
Speak Mode: ENABLED
Welcome back! Would you like Request failed with status code: 404
Response content: b'{"detail":"Not Found"}'
me to return to being PostmanAI?
Continue with the last settings?
Name: PostmanAI
Role: An AI designed to improve my linux mail server setup and filter spam more efficiently.
Goals: ['Engineer a spam-filtering solution that works with postfix and procmail, using AI or other modern tools available on linux.', 'Provide a configuration for my mutt mail client to be able to train spam vs ham messages']
Continue (y/n): Exception in thread Thread-1 (speak):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/charlton/Auto-GPT/autogpt/speech/say.py", line 36, in speak
DEFAULT_VOICE_ENGINE.say(text)
File "/home/charlton/Auto-GPT/autogpt/speech/base.py", line 33, in say
return self._speech(text, voice_index)
File "/home/charlton/Auto-GPT/autogpt/speech/gtts.py", line 19, in _speech
playsound("speech.mp3", True)
File "/home/charlton/Auto-GPT/lib/python3.10/site-packages/playsound.py", line 101, in _playsoundNix
playbin.props.uri = 'file://' + pathname2url(os.path.abspath(sound))
AttributeError: 'NoneType' object has no attribute 'props'
This seems to be a common problem on linux with the python playsound.py module. I was able to get around this by rewriting autogpt/speech/eleven_labs.py to this:
# playsound("speech.mpeg", True)
os.system('mpg123 -q speech.mpeg')
Did what you did

It gave this error sh: 1: mpg123: not found
Do a pip install mpg123 or otherwise install it on your system.
My fault. Did following command
sudo apt-get install mpg123
It started working. Thanks
I am having the dreaded NoneType 'props' problem here as well, I found this thread after posting about it here: https://github.com/TaylorSMarks/playsound/issues/142
However I am not looking for alternative solutions just yet, is this not fixable in playsound itself? I have scripts already relying on it's function and it would be nice to have this working since many others use it as well
This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days.
This issue was closed automatically because it has been stale for 10 days with no activity.