Einstein42 / udi-ecobee-poly

Ecobee Poly
MIT License
5 stars 2 forks source link

forecastNum IndexError: list index out of range #51

Open jimboca opened 4 years ago

jimboca commented 4 years ago

---------- Forwarded message --------- From: Michel Kohanim michel@universal-devices.com Date: Wed, Feb 5, 2020 at 2:38 PM Subject: ecobee exceptions To: Jim Searle jimsearle@gmail.com

Hi Jim,  

Any ideas

2020-02-05 22:32:57,436 [Controller] [INFO ] Updating Driver rs_mxsf - ST: 78.1 uom: 17    "isCoolOff": false,
2020-02-05 22:32:57,438 [Controller] [ERROR] Exception in thread Controller:
  File "/usr/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner
  File "/usr/local/lib/python3.7/threading.py", line 865, in run
    self.run()
  File "/usr/local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 791, in _parseInput
  File "/usr/local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 823, in _handleResult
    self.nodes[result['address']].start()
    self._target(*self._args, **self._kwargs)
    "isHeatOff": false,
Traceback (most recent call last):
    self.update(self.revData, self.fullData)
    self._update()
  File "/app/nodeserver/node_types.py", line 221, in start
  File "/app/nodeserver/node_types.py", line 285, in update
    self._handleResult(input[key])
    self.check_weather()
    self.weather.update(self.tstat['weather'])
  File "/app/nodeserver/node_types.py", line 395, in _update
  File "/app/nodeserver/node_types.py", line 248, in check_weather
    currentWeather = weather['forecasts'][self.forecastNum]
  File "/app/nodeserver/node_types.py", line 884, in update
IndexError: list index out of range

With kind regards,  **  Michel Kohanim  CEO   (p) 818.631.0333  http://www.universal-devices.com ** 

jimboca commented 4 years ago

Looks like this is related to not having any weather data, need to just skip the weather nodes when we don't have that info? But need to debug further...