dingdang-robot / dingdang-contrib

来自用户贡献的叮当插件集
95 stars 83 forks source link

key words of my contrib have been detected, when i check in verbose log.however,error ocurred #48

Closed sainttelant closed 6 years ago

sainttelant commented 6 years ago

as i mentioned above, i 've finished my contrib, i found dingdang has detected key WORDS of my code though --verbose, however, the error occurred as follows,why?

2018-03-08 21:30:38,380 stt.py[line:446] INFO 讯飞语音识别到了: 星。 Traceback (most recent call last): File "dingdang.py", line 178, in app.run() File "dingdang.py", line 125, in run conversation.handleForever() File "/home/pi/dingdang/client/conversation.py", line 86, in handleForever self.brain.query(input, self.wxbot) File "/home/pi/dingdang/client/brain.py", line 105, in query if plugin.isValid(text) and self.isEnabled(plugin): File "/home/pi/dingdang/client/brain.py", line 79, in isEnabled if slug in self.profile and 'enable' in self.profile[slug]: TypeError: argument of type 'NoneType' is not iterable 2018-03-08 21:30:38,383 base.py[line:159] INFO Scheduler has been shut down

sainttelant commented 6 years ago

anybody has any idea?

wzpan commented 6 years ago

Have you correctly written profile.yml? The problem occurs when the configuration is missing.

sainttelant commented 6 years ago

@wzpan nope, i 've already configured the yaml files, however, i only wrote the head of SlUG in profile.yaml followed as ":", because i didn't write sub-parameters like weather API,it has "key" or "location", it that okay? that is what i can find the missing configure in yml file

wzpan commented 6 years ago

That's wrong. If you have to write slug, do it like this:

my-plugin-slug:
    enable: true
sainttelant commented 6 years ago

@wzpan Thanks, it is done, i tried to write the profile as name: ,it is worked as well, thanks again ""