tchellomello / python-arlo

Python Arlo is a library written in Python 2.7/3x that exposes the Netgear Arlo cameras as Python objects.
GNU Lesser General Public License v3.0
100 stars 35 forks source link

history_event.get('properties') throwing NoneType #96

Closed tchellomello closed 4 years ago

tchellomello commented 6 years ago
2018-07-21 04:05:47 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/arlo.py", line 84, in hub_refresh
    update_base_station=True)
  File "/usr/local/lib/python3.6/site-packages/pyarlo/__init__.py", line 270, in update
    base.update()
  File "/usr/local/lib/python3.6/site-packages/pyarlo/base_station.py", line 687, in update
    self.get_ambient_sensor_data()
  File "/usr/local/lib/python3.6/site-packages/pyarlo/base_station.py", line 481, in get_ambient_sensor_data
    properties = history_event.get('properties')
AttributeError: 'NoneType' object has no attribute 'get'

cc @lukiffer can you take a look at this for us? I don't have this device so I can't test it.

jwillaz commented 6 years ago

Sounds like this may be impacting all devices. Could be related to endpoint changes on Arlo's side, similar to https://github.com/tchellomello/python-arlo/issues/92.

lukiffer commented 6 years ago

I believe this is affecting all devices except for Arlo Baby (all devices that return None for that API call). But this should have been fixed in 0.2.0

@tchellomello can you confirm which version of pyarlo this came from? It looks like Home Assistant 0.74.0 shipped with pyarlo==0.1.9.