HackerShackOfficial / Smart-Mirror

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

Cannot get weather #47

Open jamesbetterman opened 7 years ago

jamesbetterman commented 7 years ago

this is my problem 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.

J1306 commented 7 years ago

Make sure you've deleted the < > Parenthesis when inputing the api token, It then worked for me.

mauri9421 commented 7 years ago

I have the same problem! 2017-02-05-232310_1366x768_scrot 2017-02-06-025126_1366x768_scrot

Help please.

dhikanime commented 7 years ago

i have the same problem, & i already remove <>. anyone help pls :<

Traceback (most recent call last): File "smartmirror.py", line 157, 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.

mauri9421 commented 7 years ago

Probably is the api... Change it for this! api Good luck!

dmrowe84 commented 7 years ago

I'm seeing a lot of people with this issue, even in the closed section. i myself am having this issue, after browsing multiple forums i cannot for the life of me figure this out. can someone please solve this (im sure its stupidly simple) issue. here's a screen shot of my .py file 2017-03-09-221036_1920x1080_scrot

dmrowe84 commented 7 years ago

oh and heres the error message 2017-03-09-221904_1920x1080_scrot

dmrowe84 commented 7 years ago

@mauri9421 Did you find a solution to the error message?

JanArneBosnes commented 7 years ago

@dmrowe84 You have not set the ui_locale to anything. Its on line 20 and before time_format. You can check your ui by typing this in the terminal: locale -a

I got 'en_GB.utf8'

PabloPi1 commented 6 years ago

@JanArneBosnes I tried that and still nothing, the same message error pops up