HackerShackOfficial / Smart-Mirror

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

Cannot Get Location #37

Open jreaves287 opened 7 years ago

jreaves287 commented 7 years ago

Hello

I installed the clone program last night. So far everything is running great with the exception of finding my location. The weather forecast comes up but I get a "cannot find location" message below.

I have done nothing with the lat/long line of code. My IP address and weather API are inputted

I'm a rookie at coding so I'm sure it's something simple I'm missing.

Thanks!

mwalter260 commented 7 years ago

I am having the same problem. I think the issue is freegeoip.net. I do not know python very well but if you read over the weather class, location_req_url is defined by http://freegeoip.net/json/%s. As far as I know(again, I don't know python), % is acting as a 'getter' for the weather class which is calling the string 'ip' that was defined with your ip address.

So... if I visit the url, sure enough, it returned my coordinates but not the city and state. For the time being, I just prefer it not be displayed on the mirror.