2019-07-28 15:20:06 INFO (SyncWorker_15) [custom_components.small_baby.media_player] 源播放器状态 idle,云音乐状态:idle
2019-07-28 15:20:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 762, in state_attributes
in ATTR_TO_PROPERTY if getattr(self, attr) is not None
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 762, in <dictcomp>
in ATTR_TO_PROPERTY if getattr(self, attr) is not None
File "/config/custom_components/small_baby/media_player.py", line 164, in media_position
return self._media.attributes['media_position']
KeyError: 'media_position'
File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 376, in _async_set_up_integrations
*(async_setup_component(hass, domain, config) for domain in domains_to_load)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 562, in async_forward_entry_setup
result = await async_setup_component(self.hass, domain, self._hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 46, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/setup.py", line 52, in async_setup_component
return await task # type: ignore
File "/usr/src/homeassistant/homeassistant/setup.py", line 137, in _async_setup_component
hass, config, integration
File "/usr/src/homeassistant/homeassistant/config.py", line 757, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 232, in get_platform
f"{self.pkg_path}.{platform_name}"
File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/config/custom_components/ha-cloud-music/media_player.py", line 72, in <module>
files, names = getallfile(__dirname+'\\dist')
File "/config/custom_components/ha-cloud-music/media_player.py", line 58, in getallfile
allfilelist=os.listdir(path)