2020-05-07 07:38:55 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 288, in async_add_entities
for entity in new_entities
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 285, in <listcomp>
self._async_add_entity( # type: ignore
File "/usr/src/homeassistant/homeassistant/components/coronavirus/sensor.py", line 22, in <genexpr>
for info_type in SENSORS
File "/usr/src/homeassistant/homeassistant/components/coronavirus/sensor.py", line 37, in __init__
self.name = f"{coordinator.data[country].country} Coronavirus {info_type}"
TypeError: 'NoneType' object is not subscriptable
2020-05-07 07:38:57 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ha_cloud_music doing I/O at custom_components/ha_cloud_music/binary_sensor.py, line 119: res = requests.get('http://www.nongli.cn/rili/api/app/god/'+_a+'.js')
2020-05-07 07:38:57 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ha_cloud_music doing I/O at custom_components/ha_cloud_music/binary_sensor.py, line 163: + '&co=&resource_id=6018&t=1573873782858&ie=utf8&oe=gbk&cb=op_aladdin_callback&format=json&tn=baidu&cb=&_=1573873715796')
2020-05-07 07:39:08 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.ha_cloud_music fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 472, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/ha_cloud_music/media_player.py", line 347, in update
self._media_duration = self.media_duration
File "/config/custom_components/ha_cloud_music/media_player.py", line 522, in media_duration
if ':' in attr['media_position']:
KeyError: 'media_position'
2020-05-07 07:39:08 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 53, in async_update_entity
await entity_obj.async_update_ha_state(True)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 284, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/config/custom_components/ha_cloud_music/media_player.py", line 355, in state_attributes
attr = super().state_attributes
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 804, in state_attributes
value = getattr(self, attr)
File "/config/custom_components/ha_cloud_music/media_player.py", line 522, in media_duration
if ':' in attr['media_position']:
KeyError: 'media_position'
2020-05-07 07:39:10 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/ha_cloud_music/media_player.py", line 265, in interval
self.api_media.debug('当前时间:%s,当前进度:%s,总进度:%s', self._media_position_updated_at, self._media_position, self.media_duration)
File "/config/custom_components/ha_cloud_music/media_player.py", line 522, in media_duration
if ':' in attr['media_position']:
KeyError: 'media_position'