MyRobotLab/InMoov

Error with OpenWeather

Closed this issue · 3 comments

File "C:/Myrobotlab/myrobotlab.1.0.2596/InMoov/services/H_OpenWeatherMap.py", line 43, in isTheSunShiny
todayforecast=weather[3].decode("utf-8")
AttributeError: 'NoneType' object has no attribute 'decode'

def isTheSunShiny(townParam=town):
weather=getRawWeather(townParam)

if weather[1]!=1000 and isChatbotActivated:
todayforecast=weather[3].decode("utf-8")

moz4r commented

Hi Gael, fixed ?
( now OpenWeatherMap will warn user about bad api key )
You can get a free one here : http://openweathermap.org/appid

Hello Anthony,
Yes now it's giving the warning for the API key

Great!