-
Finish emoji parsing
-
Finish JSON data storage
-
Add data storage rotation
-
Add exception handling for broken internet connection (IOError from owm api)
-
urlopen error
Traceback (most recent call last): File "tempi-script.py", line 138, in <module> perform_update() File "tempi-script.py", line 123, in perform_update get_outside() File "tempi-script.py", line 56, in get_outside observation = owm.weather_at_zip_code(zip_code,country_code) File "/usr/local/lib/python2.7/dist-packages/pyowm/webapi25/owm25.py", line 282, in weather_at_zip_code 'lang': self._language}) File "/usr/local/lib/python2.7/dist-packages/pyowm/commons/weather_client.py", line 94, in call_API return self._lookup_cache_or_invoke_API(self._cache, url, timeout) File "/usr/local/lib/python2.7/dist-packages/pyowm/commons/weather_client.py", line 65, in _lookup_cache_or_invoke_API raise api_call_error.APICallError(str(e), e) pyowm.exceptions.api_call_error.APICallError: Exception in calling OWM web API. Reason: <urlopen error [Errno -2] Name or service not known> Caused by: <urlopen error [Errno -2] Name or service not known>
-
IOError
-
ERROR:__main__:Problem calling OWM API. Traceback (most recent call last): File "tempi-script.py", line 175, in main perform_update() File "tempi-script.py", line 158, in perform_update get_condition() File "tempi-script.py", line 80, in get_condition observation = owm.weather_at_zip_code(zip_code,country_code) File "/usr/local/lib/python2.7/dist-packages/pyowm/webapi25/owm25.py", line 282, in weather_at_zip_code 'lang': self._language}) File "/usr/local/lib/python2.7/dist-packages/pyowm/commons/weather_client.py", line 94, in call_API return self._lookup_cache_or_invoke_API(self._cache, url, timeout) File "/usr/local/lib/python2.7/dist-packages/pyowm/commons/weather_client.py", line 65, in _lookup_cache_or_invoke_API raise api_call_error.APICallError(str(e), e) APICallError: Exception in calling OWM web API. Reason: <urlopen error [Errno -3] Temporary failure in name resolution> Caused by: <urlopen error [Errno -3] Temporary failure in name resolution> WARNING:urllib3.connectionpool:Retrying (Retry(total=2, connect=None, read=None, redirect=0, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0xb5d5e0f0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /bot<sanitized_bot_token>/sendMessage
-
socket.error
Traceback (most recent call last): File "tempi-script.py", line 155, in <module> perform_update() File "tempi-script.py", line 140, in perform_update get_condition() File "tempi-script.py", line 68, in get_condition observation = owm.weather_at_zip_code(zip_code,country_code) File "/usr/local/lib/python2.7/dist-packages/pyowm/webapi25/owm25.py", line 282, in weather_at_zip_code 'lang': self._language}) File "/usr/local/lib/python2.7/dist-packages/pyowm/commons/weather_client.py", line 94, in call_API return self._lookup_cache_or_invoke_API(self._cache, url, timeout) File "/usr/local/lib/python2.7/dist-packages/pyowm/commons/weather_client.py", line 55, in _lookup_cache_or_invoke_API response = urlopen(API_full_url, None, timeout) File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 429, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 447, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib/python2.7/urllib2.py", line 1201, in do_open r = h.getresponse(buffering=True) File "/usr/lib/python2.7/httplib.py", line 1121, in getresponse response.begin() File "/usr/lib/python2.7/httplib.py", line 438, in begin version, status, reason = self._read_status() File "/usr/lib/python2.7/httplib.py", line 394, in _read_status line = self.fp.readline(_MAXLINE + 1) File "/usr/lib/python2.7/socket.py", line 480, in readline data = self._sock.recv(self._rbufsize) socket.error: [Errno 104] Connection reset by peer