{"action":"created","issue":{"url":"https://api.github.com/repos/ultrabug/py3status/issues/1342","repository_url":"https://api.github.com/repos/ultrabug/py3status","labels_url":"https://api.github.com/repos/ultrabug/py3status/issues/1342/labels{/name}","comments_url":"https://api.github.com/repos/ultrabug/py3status/issues/1342/comments","events_url":"https://api.github.com/repos/ultrabug/py3status/issues/1342/events","html_url":"https://github.com/ultrabug/py3status/issues/1342","id":320033752,"number":1342,"title":"py3status throws several warnings, exceptions","user":{"login":"lasers","id":852504,"avatar_url":"https://avatars2.githubusercontent.com/u/852504?v=4","gravatar_id":"","url":"https://api.github.com/users/lasers","html_url":"https://github.com/lasers","followers_url":"https://api.github.com/users/lasers/followers","following_url":"https://api.github.com/users/lasers/following{/other_user}","gists_url":"https://api.github.com/users/lasers/gists{/gist_id}","starred_url":"https://api.github.com/users/lasers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lasers/subscriptions","organizations_url":"https://api.github.com/users/lasers/orgs","repos_url":"https://api.github.com/users/lasers/repos","events_url":"https://api.github.com/users/lasers/events{/privacy}","received_events_url":"https://api.github.com/users/lasers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-03T18:38:27Z","updated_at":"2018-05-07T04:38:03Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"```\r\n2018-05-03 05:48:28 WARNING Instance `weather_yahoo`, user method `weather_yahoo` failed (TypeError) weather_yahoo.py line 230.\r\n2018-05-03 05:48:28 INFO Traceback\r\nTypeError: 'NoneType' object has no attribute '__getitem__'\r\n  File \"py3status/py3status/module.py\", line 732, in run\r\n    response = method()\r\n  File \"py3status/py3status/modules/weather_yahoo.py\", line 266, in weather_yahoo\r\n    today, forecasts, channel = self._organize(weather_data)\r\n  File \"py3status/py3status/modules/weather_yahoo.py\", line 230, in _organize\r\n    today = data['query']['results']['channel']['item']['condition']\r\n```\r\nError indicates `None`. EDIT: inside `try/except` instead of failing?\r\n```\r\n2018-05-03 07:26:14 WARNING Instance `air_quality`, user method `air_quality` failed (AttributeError) air_quality.py line 181.\r\n2018-05-03 07:26:14 INFO Traceback\r\nAttributeError: 'NoneType' object has no attribute 'get'\r\n  File \"py3status/py3status/module.py\", line 732, in run\r\n    response = method()\r\n  File \"py3status/py3status/modules/air_quality.py\", line 181, in air_quality\r\n    if aqi_data.get('status') == 'ok':\r\n```\r\nError indicates `None` inside `try/except` instead of failing?\r\n```\r\n2018-05-03 11:03:19 WARNING Events thread died, click events are disabled. (error) events.py line 37.\r\n2018-05-03 11:03:19 INFO Traceback\r\nerror: (4, 'Interrupted system call')\r\n  File \"py3status/py3status/events.py\", line 272, in run\r\n    event_str = self.poller_inp.readline()\r\n  File \"py3status/py3status/events.py\", line 37, in readline\r\n    poll_result = self.poller.poll(timeout)\r\n2018-05-03 11:03:19 WARNING Events thread died, click events are disabled. Please try to fix this and reload i3wm (Mod+Shift+R)\r\n```\r\nRestarting i3wm. I believe.  EDIT: More like I killed `py3status` due to high CPU usages.\r\n```\r\n2018-05-03 12:53:19 WARNING command failed (error) command.py line 177.\r\n2018-05-03 12:53:19 INFO Traceback\r\nerror: [Errno 4] Interrupted system call\r\n  File \"py3status/py3status/command.py\", line 177, in run\r\n    connection, client_address = self.sock.accept()\r\n  File \"/usr/lib/python2.7/socket.py\", line 206, in accept\r\n    sock, addr = self._sock.accept()\r\n\r\n2018-05-03 12:53:19 ERROR command failed (error) command.py line 177. Please try to fix this and reload i3wm (Mod+Shift+R)\r\n```\r\nUnsure.\r\n```\r\n2018-05-03 02:43:29 WARNING Instance `gitlab`, user method `gitlab` failed (SSLError) request.py line 63.\r\n2018-05-03 02:43:29 INFO Traceback\r\nSSLError: ('The read operation timed out',)\r\n  File \"py3status/py3status/module.py\", line 732, in run\r\n    response = method()\r\n  File \"py3status/py3status/modules/gitlab.py\", line 130, in gitlab\r\n    data = self._get_data(self.url[api])\r\n  File \"py3status/py3status/modules/gitlab.py\", line 122, in _get_data\r\n    url, timeout=self.request_timeout, headers=self.headers)\r\n  File \"py3status/py3status/py3.py\", line 1150, in request\r\n    cookiejar=cookiejar)\r\n  File \"py3status/py3status/request.py\", line 63, in __init__\r\n    self._response = urlopen(request, data=data, timeout=timeout)\r\n  File \"/usr/lib/python2.7/urllib2.py\", line 154, in urlopen\r\n    return opener.open(url, data, timeout)\r\n  File \"/usr/lib/python2.7/urllib2.py\", line 429, in open\r\n    response = self._open(req, data)\r\n  File \"/usr/lib/python2.7/urllib2.py\", line 447, in _open\r\n    '_open', req)\r\n  File \"/usr/lib/python2.7/urllib2.py\", line 407, in _call_chain\r\n    result = func(*args)\r\n  File \"/usr/lib/python2.7/urllib2.py\", line 1241, in https_open\r\n    context=self._context)\r\n  File \"/usr/lib/python2.7/urllib2.py\", line 1201, in do_open\r\n    r = h.getresponse(buffering=True)\r\n  File \"/usr/lib/python2.7/httplib.py\", line 1121, in getresponse\r\n    response.begin()\r\n  File \"/usr/lib/python2.7/httplib.py\", line 438, in begin\r\n    version, status, reason = self._read_status()\r\n  File \"/usr/lib/python2.7/httplib.py\", line 394, in _read_status\r\n    line = self.fp.readline(_MAXLINE + 1)\r\n  File \"/usr/lib/python2.7/socket.py\", line 480, in readline\r\n    data = self._sock.recv(self._rbufsize)\r\n  File \"/usr/lib/python2.7/ssl.py\", line 766, in recv\r\n    return self.read(buflen)\r\n  File \"/usr/lib/python2.7/ssl.py\", line 653, in read\r\n    v = self._sslobj.read(len)\r\n\r\n2018-05-03 02:58:39 WARNING Instance `gitlab`, user method `gitlab` failed (SSLError) request.py line 63.\r\n2018-05-03 02:58:39 INFO Traceback\r\nSSLError: ('The read operation timed out',)\r\n```\r\nError indicates a possible dropped connection. Also, earlier, I received `None`-related exception from `gitlab` a day or two ago so I recently made changes to `gitlab` to test all three data before proceeding. Red herring?\r\n\r\nThe logs may be related to #941.  The exception times seems to be happening when I get back on the computer after getting off. Some comes from i3 restarts too... for py3status. Thank you."},"comment":{"url":"https://api.github.com/repos/ultrabug/py3status/issues/comments/386955333","html_url":"https://github.com/ultrabug/py3status/issues/1342#issuecomment-386955333","issue_url":"https://api.github.com/repos/ultrabug/py3status/issues/1342","id":386955333,"user":{"login":"lasers","id":852504,"avatar_url":"https://avatars2.githubusercontent.com/u/852504?v=4","gravatar_id":"","url":"https://api.github.com/users/lasers","html_url":"https://github.com/lasers","followers_url":"https://api.github.com/users/lasers/followers","following_url":"https://api.github.com/users/lasers/following{/other_user}","gists_url":"https://api.github.com/users/lasers/gists{/gist_id}","starred_url":"https://api.github.com/users/lasers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lasers/subscriptions","organizations_url":"https://api.github.com/users/lasers/orgs","repos_url":"https://api.github.com/users/lasers/repos","events_url":"https://api.github.com/users/lasers/events{/privacy}","received_events_url":"https://api.github.com/users/lasers/received_events","type":"User","site_admin":false},"created_at":"2018-05-07T04:38:03Z","updated_at":"2018-05-07T04:38:03Z","author_association":"CONTRIBUTOR","body":"And lately, I have been experiencing horrific high CPU usages with py3status making it unbearable to keep working on `xrandr_tweaks` and other modules.\r\n\r\nI get same thing with `py3status2` and I tried it with and without `--gevent`. I don't know if this would work, but I tried git bisect and got same high CPU usages in `py3status 3.4` too. Something changed recently to make `py3status` behave erratically... Question: Is it `py3status` or outside `py3status`?\r\n\r\n![2018-05-06-232004_scrot](https://user-images.githubusercontent.com/852504/39684902-b0df891c-5184-11e8-86d3-c1e8b567d9db.png)\r\n\r\n"}}
{"actor":{"display_login":"lasers"}}