Open ys7yoo opened 7 years ago
Need to upgrade Beautiful soup (at least 4.4) https://stackoverflow.com/questions/41693826/about-python3-6-when-i-import-bs4-it-doesnt-work
Solution: reinstall! sudo pip3 install --upgrade --force-reinstall beautifulsoup4
email.MIMEText ==> email.mime.text https://stackoverflow.com/questions/6971085/import-error-in-python
WARNING:client.brain:Skipped module 'MPDControl' due to an error.
Traceback (most recent call last):
File "/home/yyoo/src/jasper3/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "<frozen importlib._bootstrap_external>", line 396, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 817, in load_module
File "<frozen importlib._bootstrap_external>", line 676, in load_module
File "<frozen importlib._bootstrap>", line 268, in _load_module_shim
File "<frozen importlib._bootstrap>", line 693, in _load
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 673, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/yyoo/src/jasper3/client/modules/MPDControl.py", line 5, in <module>
import mpd
File "/home/yyoo/.local/lib/python3.5/site-packages/mpd.py", line 399
except socket.error, err:
^
https://stackoverflow.com/questions/31964722/python-3-4-socket-error-deprecated-new-equivalent
except Exception, e:
=>
except Exception as e:
To solve mpd issue, install python-mpd2 instead of python-mpd
pip3 uninstall python-mpd
pip3 install python-mpd2
yyoo@raspberrypi:~/src/jasper3 $ python3 jasper3.py
Can't find CMUCLMTK command 'text2wfreq'! Please check if CMUCLMTK is installed and in your $PATH.
Error importing CMUCLMTK module. PocketsphinxVocabulary will not work correctly.
Traceback (most recent call last):
File "/home/yyoo/src/jasper3/client/vocabcompiler.py", line 24, in <module>
import cmuclmtk
File "/home/yyoo/.local/lib/python3.5/site-packages/cmuclmtk/__init__.py", line 64, in <module>
raise ImportError("CMUCLMTK command(s) missing or not in $PATH.")
ImportError: CMUCLMTK command(s) missing or not in $PATH.
*******************************************************
* JASPER - THE TALKING COMPUTER *
* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
*******************************************************
[<class 'client.stt.GoogleSTT'>]
True
WARNING:client.brain:Skipped module 'Time' due to an error.
Traceback (most recent call last):
File "/home/yyoo/src/jasper3/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "<frozen importlib._bootstrap_external>", line 396, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 817, in load_module
File "<frozen importlib._bootstrap_external>", line 676, in load_module
File "<frozen importlib._bootstrap>", line 268, in _load_module_shim
File "<frozen importlib._bootstrap>", line 693, in _load
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 673, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/yyoo/src/jasper3/client/modules/Time.py", line 5, in <module>
from semantic.dates import DateService
File "/usr/local/lib/python3.5/dist-packages/semantic/dates.py", line 360
def merge((day, time)):
^
SyntaxError: invalid syntax
WARNING:client.brain:Skipped module 'Weather' due to an error.
Traceback (most recent call last):
File "/home/yyoo/src/jasper3/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "<frozen importlib._bootstrap_external>", line 396, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 817, in load_module
File "<frozen importlib._bootstrap_external>", line 676, in load_module
File "<frozen importlib._bootstrap>", line 268, in _load_module_shim
File "<frozen importlib._bootstrap>", line 693, in _load
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 673, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/yyoo/src/jasper3/client/modules/Weather.py", line 10, in <module>
from semantic.dates import DateService
File "/usr/local/lib/python3.5/dist-packages/semantic/dates.py", line 360
def merge((day, time)):
^
SyntaxError: invalid syntax
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=1'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=1'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=1'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=1'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=1'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=1'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=1'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=1'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=1,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=1,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=1,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Traceback (most recent call last):
File "jasper3.py", line 151, in <module>
app.run()
File "jasper3.py", line 118, in run
self.mic.say(salutation)
File "/home/yyoo/src/jasper3/client/mic.py", line 262, in say
self.speaker.say(phrase)
File "/home/yyoo/src/jasper3/client/tts.py", line 472, in say
self.play_mp3(tmpfile)
File "/home/yyoo/src/jasper3/client/tts.py", line 100, in play_mp3
wav.setframerate(mf.samplerate())
File "/usr/lib/python3.5/wave.py", line 355, in setframerate
raise Error('bad frame rate')
wave.Error: bad frame rate
Exception ignored in: <bound method Wave_write.__del__ of <wave.Wave_write object at 0x75608b90>>
Traceback (most recent call last):
File "/usr/lib/python3.5/wave.py", line 316, in __del__
self.close()
File "/usr/lib/python3.5/wave.py", line 434, in close
self._ensure_header_written(0)
File "/usr/lib/python3.5/wave.py", line 452, in _ensure_header_written
raise Error('# channels not specified')
wave.Error: # channels not specified
This may help. https://github.com/Kitt-AI/snowboy/issues/45
What should we do?