The async MPDClient apparently can get into a weird state, where trying to call disconnect() on it results in the following traceback:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update
await task
File "/usr/src/homeassistant/homeassistant/components/mpd/media_player.py", line 174, in async_update
self._disconnect()
File "/usr/src/homeassistant/homeassistant/components/mpd/media_player.py", line 133, in _disconnect
self._client.disconnect()
File "/usr/local/lib/python3.8/site-packages/mpd/asyncio.py", line 188, in disconnect
if self.__wfile is not None:
AttributeError: 'MPDClient' object has no attribute '_MPDClient__wfile'
We're already catching mpd.ConnectionError for disconnect, but that AttributeError should probably be handled in python-mpd2.
The async MPDClient apparently can get into a weird state, where trying to call
disconnect()
on it results in the following traceback:We're already catching
mpd.ConnectionError
fordisconnect
, but that AttributeError should probably be handled in python-mpd2.