bharadwaj-raju / WeatherDesk

MOVED: https://gitlab.com/bharadwaj-raju/WeatherDesk
https://gitlab.com/bharadwaj-raju/WeatherDesk
GNU General Public License v3.0
217 stars 31 forks source link

[Exception] Doesn't want to run with weather sync on (Ubuntu 20.04 LTS - Wayland) #42

Closed smith558 closed 4 years ago

smith558 commented 4 years ago

after running python3 WeatherDesk.py without --no-weather getting this exception [Errno -5] No address associated with hostname

stanley@Smith558-Lenovo:~$ cd WeatherDesk-master/
stanley@Smith558-Lenovo:~/WeatherDesk-master$ python3 WeatherDesk.py --time 4
[Main loop] 
Traceback (most recent call last):
  File "/usr/lib/python3.8/urllib/request.py", line 1326, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/lib/python3.8/http/client.py", line 1240, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1286, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1235, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1006, in _send_output
    self.send(msg)
  File "/usr/lib/python3.8/http/client.py", line 946, in send
    self.connect()
  File "/usr/lib/python3.8/http/client.py", line 1402, in connect
    super().connect()
  File "/usr/lib/python3.8/http/client.py", line 917, in connect
    self.sock = self._create_connection(
  File "/usr/lib/python3.8/socket.py", line 787, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -5] No address associated with hostname

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "WeatherDesk.py", line 356, in <module>
    set_conditional_wallpaper(parsed_args['city'],
  File "WeatherDesk.py", line 305, in set_conditional_wallpaper
    weather, actual_city = get_current_weather(city)
  File "WeatherDesk.py", line 294, in get_current_weather
    weather_json = json.loads(urlopen(weather_json_url).read().decode('utf-8'))['query']['results']['channel']
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 1369, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/lib/python3.8/urllib/request.py", line 1329, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -5] No address associated with hostname>

/bin/sh: 1: 4: not found
smith558 commented 4 years ago

Yahoo shut down query.yahooapis.com ? https://stackoverflow.com/questions/54046823/yql-query-service-replacement-now-that-yahoo-shut-it-down

bharadwaj-raju commented 4 years ago

Yes, it does seem like Yahoo has shut down it's query service. I'll update it to use OpenWeatherMap etc soon.

Also, WeatherDesk has been moved to Gitlab, so please open the issue there. I won't be updating this repo anymore.

https://gitlab.com/bharadwaj-raju/WeatherDesk/

bharadwaj-raju commented 4 years ago

Actually, I forgot: WeatherDesk has already been updated to use OpenWeatherMap, on the Gitlab version.

Please use that. This repo is old and won't be updated. I'll be archiving it.

Closing.