Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on timeout error with 522 code #52

Closed
jimboca opened this issue Mar 16, 2020 · 1 comment
Closed

Crash on timeout error with 522 code #52

jimboca opened this issue Mar 16, 2020 · 1 comment
Assignees

Comments

@jimboca
Copy link
Collaborator

jimboca commented Mar 16, 2020

Log shows this:

2020-03-16 17:00:26,578 [Controller] [DEBUG] Ecobee Controller:post: Sending: url=https://api.ecobee.com/token payload={}
2020-03-16 17:00:56,996 [Controller] [DEBUG] Ecobee Controller:reponse:post:  Got: code=522
2020-03-16 17:00:56,997 [Controller] [ERROR] Ecobee Controller:reponse:post: Unknown response 522: https://api.ecobee.com/token?grant_type=refresh_token&client_id=19j5o2QheoDIYeuwPGOCWV80hI07lbDC&refresh_token=ltTQtoNHJcG0TrHya53H8hwJz0SpkeGu <!DOCTYPE html>
<

Which results in:

: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "/var/polyglot/nodeservers/Ecobee/pgSession.py", line 71, in response
    json_data = json.loads(response.text)
  File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2020-03-16 17:00:57,001 [Controller] [DEBUG] controller:set_ecobee_st: True=1
2020-03-16 17:00:57,008 [Controller] [ERROR] Exception in thread Controller:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/var/polyglot/.local/lib/python3.7/site-packages/polyinterface/polyinterface.py", line 858, in _parseInput
    self.longPoll()
  File "./ecobee-poly.py", line 204, in longPoll
    self.updateThermostats()
  File "./ecobee-poly.py", line 217, in updateThermostats
    thermostats = self.getThermostats()
  File "./ecobee-poly.py", line 453, in getThermostats
    'includesEquipmentStatus': True
  File "./ecobee-poly.py", line 439, in session_get
    if self._getRefresh() is True:
  File "./ecobee-poly.py", line 123, in _getRefresh
    if 'error' in res_data:
TypeError: argument of type 'bool' is not iterable
jimboca added a commit that referenced this issue Mar 18, 2020
jimboca added a commit that referenced this issue Mar 18, 2020
@jimboca jimboca self-assigned this Mar 18, 2020
@jimboca
Copy link
Collaborator Author

jimboca commented Apr 7, 2020

Has not happened again, must be fixed.

@jimboca jimboca closed this as completed Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant