HackerShackOfficial / AI-Smart-Mirror

Smart Mirror with a smart AI 🤖
MIT License
537 stars 214 forks source link

KeyError: 'minutely' #27

Open rayzsoul opened 7 years ago

rayzsoul commented 7 years ago

Hi,

The mirror keeps failing to understand the weather intent. Do you know how to fix KeyError: 'minutely'?

Thanks!

-- I'm listening Found audio Google Speech Recognition thinks you said how's the weather like today { "msg_id" : "204ad351-2b59-4edc-bdda-f418438d8100", "_text" : "how's the weather like today", "entities" : { "datetime" : [ { "confidence" : 0.9965476720505433, "values" : [ { "value" : "2017-02-01T00:00:00.000-08:00", "grain" : "day", "type" : "value" } ], "value" : "2017-02-01T00:00:00.000-08:00", "grain" : "day", "type" : "value" } ], "Intent" : [ { "confidence" : 0.9993092979476336, "value" : "weather" } ] } } weather Failed wit! 'minutely' Traceback (most recent call last): File "bot.py", line 79, in decide_action self.__weather_action(entities) File "bot.py", line 174, in __weather_action weather_obj = self.knowledge.find_weather() File "/Users/1100192/Desktop/RayzSmartMirror/AI-Smart-Mirror/knowledge.py", line 25, in find_weather hourly_forecast = weather_json['minutely']['summary'] KeyError: 'minutely'

mirekcerny commented 7 years ago

I found this conversation: https://github.com/wit-ai/wit/issues/230 It seems that a new user session ID shall be used for wit.ai when restarting the conversation. I however don't know how to fix the code..