-
Notifications
You must be signed in to change notification settings - Fork 535
troubleshooting
- 启动后报错:
Traceback (most recent call last):
File "dingdang/dingdang.py", line 191, in <module>
app.run()
File "dingdang/dingdang.py", line 157, in run
conversation.handleForever()
File "/home/pi/dingdang/client/conversation.py", line 65, in handleForever
threshold, transcribed = self.mic.passiveListen(self.persona)
File "/home/pi/dingdang/client/mic.py", line 143, in passiveListen
frames_per_buffer=CHUNK)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open
stream = Stream(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__
self._stream = pa.open(**arguments)
IOError: [Errno Invalid input device (no default output device)] -9996
答:同时打开了多个叮当,而声卡已被之前的叮当进程占用导致。把叮当进程都结束了,再重新启动叮当即可。
- 启动后报如下错误:
答:请确保 vocabularies.zip 已下载并解压到正确位置。
- 启动后报这个错误是什么原因?
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
答:PyAudio 的提醒信息。不影响工作,不用管。
- 启动后报这个错误是什么原因?
Traceback (most recent call last):
File "dingdang.py", line 11, in <module>
from client import tts
File "/home/pi/dingdang/client/tts.py", line 25, in <module>
import diagnose
File "/home/pi/dingdang/client/diagnose.py", line 9, in <module>
import pip.req
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 74, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 25, in <module>
from requests.compat import IncompleteRead
ImportError: cannot import name IncompleteRead
答:pip 的问题。重装 pip 。例如可以使用 easy_install
安装:
sudo apt-get remove python-pip # 先卸掉原来的 pip
sudo easy_install pip # 重装 pip
- 启动后报如下错误:
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2017-08-09 22:38:45 HKT)" raised an exception
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
retval = job.func(*job.args, **job.kwargs)
File "/home/pi/dingdang/client/notifier.py", line 41, in gather
[client.run() for client in self.notifiers]
File "/home/pi/dingdang/client/notifier.py", line 18, in run
self.timestamp = self.gather(self.timestamp)
File "/home/pi/dingdang/client/notifier.py", line 45, in handleEmailNotifications
emails = Email.fetchUnreadEmails(self.profile, since=lastDate)
File "/home/pi/dingdang/client/plugins/Email.py", line 145, in fetchUnreadEmails
(retcode, messages) = conn.search(None, '(UNSEEN)')
File "/usr/lib/python2.7/imaplib.py", line 639, in search
typ, dat = self._simple_command(name, *criteria)
File "/usr/lib/python2.7/imaplib.py", line 1087, in _simple_command
return self._command_complete(name, self._command(name, *args))
File "/usr/lib/python2.7/imaplib.py", line 837, in _command
', '.join(Commands[name])))
error: command SEARCH illegal in state AUTH, only allowed in states SELECTED
答:邮箱没有配置好。注意如下几个要求:
- 不要使用QQ邮箱,不要使用网易手机邮箱;
- 如果使用网易邮箱,密码应该是客户端授权码;
- 如果使用网易邮箱,还需开启未认证客户端的使用权限。
请详细参考 配置 一节配置好邮箱。
- 启动后报下面这样的错误:
答:/home/pi/.dingdang/profile.yml 格式错误。请检查你的内容是不是破坏了YAML格式要求。
- 启动后报如下错误:
Traceback (most recent call last):
File "dingdang.py", line 16, in
from client.conversation import Conversation
File "/home/kevin/dingdang/client/conversation.py", line 6, in
from drivers.pixels import pixels
File "/home/kevin/dingdang/client/drivers/pixels.py", line 124, in
pixels = Pixels()
File "/home/kevin/dingdang/client/drivers/pixels.py", line 21, in init
self.dev = apa102.APA102(num_led=self.PIXELS_N)
File "/home/kevin/dingdang/client/drivers/apa102.py", line 90, in init
self.spi.open(bus, device) # Open SPI port 0, slave device (CS) 1
IOError: [Errno 2] No such file or directory
答:raspi-config
进入树莓派设置,然后进入 Interfacing Options
,开启 SPI ,以支持控制 LED 灯。
- 叮当镜像的账户和密码是什么?
答:默认的账户和密码和 Raspbian 系统相同。账户名为 pi,密码为 raspberry。
- 关了终端后叮当就不工作了,怎么办?
答:应该使用 tmux 或 screen 或 nohup 等终端复用工具来挂机。
- 开启微信接入功能后,Ctrl-C 关闭不了叮当,怎么办?
答:Ctrl-C 关闭不了是微信接入模块 wxbot 的问题。解决办法是 Ctrl-Z 退出当前会话,然后执行如下命令:
ps auwx | grep dingdang # 查看dingdang的PID号
kill -9 PID号
- 和叮当交互时报如下错误:
CRITICAL:client.tts:Baidu TTS failed with response: u'authentication failed'.
答:请确保您已创建了百度语音的应用,并申请了语音识别和语音合成两个功能(两个都要!),并且准确填写了 API Key 和 API Secret 。
- 微信登录成功了,但发出的指令没有任何响应。
答:发给微信里自己的微信账号,而不是发给文件传输助手。比如,你的微信昵称如果是“赵日天”,那么就找到“赵日天”这个微信号,进去发信息。
- OpenFST 编译好久啊。
答:耐心等待。
- 叮当总是过快结束主动聆听。
答:当使用较差的麦克风时,麦克风听到的声音小,容易判断为没说话而过快结束聆听。可以试试将 dingdang/client/mic.py 里的 0.8 这个值设置小一些,使结束聆听的条件变得更苛刻一点,从而延长聆听时间。如果没有这个问题,则不建议修改本值,以避免说完话后还要等一段时间才能结束聆听。
- 叮当的唤醒词误判率很高。
答:使用长一点的唤醒词可以减少误判。例如,我亲测 PocketSphinx + 唤醒词 “HEYDINGDANG” 的误判率就比较低。另外,如果使用 ReSpeaker 2-Mics Pi HAT开发板,可以利用开发板上的开关,在不需要交互时临时禁用麦克风。方法见 ReSpeaker-Switcher。