HackerShackOfficial / Smart-Mirror

Raspberry powered mirror which can display news, weather, calendar events
MIT License
908 stars 384 forks source link

cant get weather? #40

Closed liquid1 closed 7 years ago

liquid1 commented 7 years ago

please elaborate and help me with the issue.. Traceback (most recent call last): File "smartmirror.py", line 158, in get_weather weather_obj = json.loads(r.text) File "/usr/lib/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Error: No JSON object could be decoded. Cannot get weather.

(and i have added the API token)

liquid1 commented 7 years ago

i figured out every error related to news and weather. i am disappointed for your response. i even mailed you on gmail but even no reply from there. Anyways thanks for this great opportunity for keeping this open source. smartmirror

rosegoldthakur commented 7 years ago

@liquid1 hey could you please explain that how you fixed that above issue ? i am struggling with the same error right now. Also is the Secret Key the API TOKEN ? Please help!!

liquid1 commented 7 years ago

send the screenshot of your weather code..

rosegoldthakur commented 7 years ago

@liquid1 hey I have got it to work now. I was not deleting the parenthesis before and after my TOKEN. Everything is working good for me now. Thank you :)

liquid1 commented 7 years ago

no problem. if you will face any other problem feel free to ask.

seonghun0312 commented 7 years ago

hey @liquid1, I have same error. I know it's kinda late to ask, but can you fix mine too? thanx

jamesbetterman commented 7 years ago

hey @liquid1 i know i am kinda late but do you think you could show me whats wrong? ive got screenshots. 2017-01-25-102002_1280x1024_scrot 2017-01-25-102034_1280x1024_scrot

enkuu commented 7 years ago

I kinda have a same problem here guys. Anyone got a solution for this?

aRandomGadjee commented 6 years ago

@jamesbetterman Your token, You only need the token code, not the URL I believe

nfao2 commented 4 years ago

hi can you help me with my issue? i keep getting this in get_weather temperature2 = "%s%s" %(str(int(weather_obj['currently']['temperature'])), degree_sign) KeyError: 'currently' Error: 'currently'. Cannot get weather.