-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
troubleshooting
潘伟洲 edited this page Mar 2, 2019
·
12 revisions
Traceback (most recent call last):
File "wukong.py", line 2, in
from snowboy import snowboydecoder
File "/home/pi/wukong-robot/snowboy/snowboydecoder.py", line 5, in
from . import snowboydetect
File "/home/pi/wukong-robot/snowboy/snowboydetect.py", line 17, in
_snowboydetect = swig_import_helper()
File "/home/pi/wukong-robot/snowboy/snowboydetect.py", line 16, in swig_import_helper
return importlib.import_module('_snowboydetect')
File "/usr/lib/python2.7/importlib/**init**.py", line 37, in import_module
**import**(name)
ImportError: No module named _snowboydetect
答:你需要确保两个事情:
- 使用 Python 3 执行本程序;
- 确保用上了平台可用的 _snowboydetect.so 包。建议自行编译一个。
2019-02-26 21:58:52,491 - robot.plugin_loader - INFO - 插件 YouDaoFanYi 加载成功
2019-02-26 21:58:52,496 - robot.Brain - INFO - 已激活插件:['cleancache', 'email', 'poem', 'baidufm', 'mqttPub', 'direction', 'emailmypc', 'halt', 'homeassistant', 'headline_news', 'Lamp', 'pi_status', 'reboot', 'roadcondition', 'speak_ip', 'speak_temperature', 'wol', 'youdao']
2019-02-26 21:58:53,572 - robot.TTS - INFO - baidu-tts 语音合成成功,合成路径:/tmp/tmp4vev4mop.mp3
connect(2) call to /tmp/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
答:不影响功能,只是pulseaudio的告警,可以忽略。
Exception in thread Thread-6:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/Users/FanXingGuo/Downloads/wukong-robot-master/robot/Player.py", line 81, in run
self.pipe = subprocess.Popen(cmd, stdout=f, stderr=f)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 947, in **init**
restore_signals, start_new_session)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'play'
答:你需要先安装 sox 。参见 安装教程 。
离线唤醒机制初始化失败:[Errno -9996] Invalid input device (no default output device)
答:启动了多个 wukong-robot 了。请参见 退出 ,kill 掉所有后台的 wukong 进程。
播放音乐的时候,没有声音。
答:你需要安装 mp3 的 sox 解码库:
sudo apt-get install libsox-fmt-all