On 4/14/2017 10:27 AM, Kasper wrote:
every time i run the program i get this messeage:

Traceback (most recent call last):
  File "smartmirror.py", line 159, in get_weather
    temprature2 = "%S%S" % (str(int(weather_obj['currently']['temperature'])),
degree_sign)
KeyError: 'currently'
Error: 'currently'. Cannot get weather.

How do i fix that?

Use a valid key for weather_obj.  Check doc or add
    print(list(weather_obj.keys()))
before the failing subscription.

Here is the program:

I second Steve's comment.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to