"Error doing job: Task exception was never retrieved" (was Version 0.61+ and ISY994i)

Hi,

Apparently, version 0.61 introduced a lot of changes related to ISY994i. Since the update, every 10 minutes or so, I get the following in my logs:

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/tasks.py", line 180, in _step
result = coro.send(None)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 218, in async_update_ha_state
device_attr = self.device_state_attributes
  File "/usr/lib/python3.6/site-packages/homeassistant/components/isy994.py", line 472, in device_state_attributes
for name, val in self._node.aux_properties.items():
AttributeError: 'list' object has no attribute 'items'

Does anyone have any idea what could be wrong or point me in the right direction? Should I do anything about it. Everything seems to work.

Thanks!

EDIT: my issue persists up to the latest version (currently 0.64.3).

Can you go into your dev-state page in HA and search for “aux_properties”. It seems the code expects, that if found, that should be a dictionary, but in your instance, it is a list.

I also have an ISY but I’m on the old 4.x series firmware and I don’t have anything with “aux_properties”.

I can’t see anything related to “aux_properties” in The States tool.

I’m on the 5.0.11B Release of ISY.

Sorry, I guess aux_props is actually a PyISY thing. In PyISY, aux_props is a list of dictionary. I think inside isy994.py it’ll need to be changed to iterate the list of dictionary.

You might be able to copy the isy994.py file over to custom_components and change

    for name, val in self._node.aux_properties.items():
        attr[name] = '{} {}'.format(val.get('value'), val.get('uom'))

to

	for prop in self._node.aux_properties:
		attr[prop.get('id')] = '{} {}'.format(prop.get('value'), prop.get('uom'))

This is just speculation based on what I see in github. Not tested.

Might want to wait for @OverloadUT

Ok, thanks. Note that I’m running HASS.io, so I’m limited to what I can do…

Hm, that’s a new one to me. I’ll need to do some digging.

I think that you can ignore the error, as it doesn’t drive anything terribly important. I’d like to get it fixed though.

Figured I’d chime in, I’m also getting the same error in the logs:

2018-01-19 18:58:42 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/entity_component.py", line 399, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/entity_component.py", line 247, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/entity.py", line 218, in async_update_ha_state
    device_attr = self.device_state_attributes
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/isy994.py", line 472, in device_state_attributes
    for name, val in self._node.aux_properties.items():
AttributeError: 'list' object has no attribute 'items'

I think that a new error that was introduced by the last 0.61 update. I don’t recall seeing it before…

Can someone add this to Github so that it eventually gets corrected in a future release? Not sure how to do this…

Thanks!

I would, but I don’t have anything with aux_properties, so I can’t really test if my suggestion would work. I’m pretty sure it would, but it would also be nice to know.

I can be a tester if needed.

I am not familiar with Hass.io. Do you have the ability to modify a component? We would need to make a copy of the isy994.py file and then make some changes to the original.

I don’t think so… At least, I don’t see how…

We might try to do it as a custom component.

https://community.home-assistant.io/t/editing-component-files-in-hassio/
See the link of the topic above.

You would need to create a custom_components folder inside your config directory, and then we would put a modified copy of isy994.py there. Does that seem like something you want to try?

Also, what version are you running?

Yes, I could do that. That’s a great idea. A custom component would override the existing one. Can you post the original one and the modification required? I will test…

I’m always on the latest version of HA…

  1. Create a custom_components folder inside your config directory
  2. Add the referenced file inside that directory
  3. Restart
  4. ???
  5. Profit

Hopefully it’ll work the first time. I’m not in a position to be able to test anything right now.

Is #3 in the following pull to address this issue:

If so, I will wait until the next update. If not, I will try the custom component…

No, it does not address this specific issue

Here is what I did: I copied the isy994.py file from:


to my local “custom_components” directory. I edited the file as suggested above (line 472 and 473 of isy994.py), then restarted HA. I think that’s the only thing I need to do. That new file should automatically be used instead of the “old” built-in one.

The results are exactly the same. Nothing got broken from what I can see, but I get the same error message in my logs:

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 223, in async_update_ha_state
    device_attr = self.device_state_attributes
  File "/usr/lib/python3.6/site-packages/homeassistant/components/isy994.py", line 472, in device_state_attributes
    for name, val in self._node.aux_properties.items():
AttributeError: 'list' object has no attribute 'items'

How can I tell if that new file is really used?

It isn’t using your edits from the custom_components directory for some reason. Not sure why. Your config folder looks like:?

custom_components\
     isy994.py
configuration.yaml

If so, then I don’t know. Either a hass.io thing or the changes didn’t get saved.