Circling back on this. It appears the errors continue after HA has been online without restart for a few days. However, unlike the regular integration, this custom component does not lose the ability to control the receiver and continues to work even though the errors are logged.
This error originated from a custom integration.
Logger: homeassistant.helpers.entity
Source: custom_components/yamaha/media_player.py:195
Integration: yamaha
First occurred: May 29, 2021, 4:00:19 AM (4 occurrences)
Last logged: 4:00:19 AM
Update for media_player.rx_v675 fails
Update for media_player.rx_v675_zone_2 fails
Traceback (most recent call last):
File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1700, in close
self.parser.Parse("", 1) # end of data
xml.parsers.expat.ExpatError: no element found: line 1, column 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 316, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 524, in async_device_update
raise exc
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/yamaha/media_player.py", line 195, in update
self._play_status = self.receiver.play_status()
File "/usr/local/lib/python3.8/site-packages/rxv/rxv.py", line 574, in play_status
src_name = self._src_name(self.input)
File "/usr/local/lib/python3.8/site-packages/rxv/rxv.py", line 284, in input
response = self._request('GET', request_text)
File "/usr/local/lib/python3.8/site-packages/rxv/rxv.py", line 184, in _request
response = cElementTree.XML(res.content)
File "/usr/local/lib/python3.8/site-packages/defusedxml/common.py", line 132, in fromstring
return parser.close()
File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1702, in close
self._raiseerror(v)
File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1602, in _raiseerror
raise err
File "<string>", line None
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
Logger: rxv
Source: /usr/local/lib/python3.8/site-packages/rxv/rxv.py:191
First occurred: May 29, 2021, 4:00:19 AM (4 occurrences)
Last logged: 4:00:19 AM
Invalid XML returned for request <YAMAHA_AV cmd="GET"><Main_Zone><Input><Input_Sel>GetParam</Input_Sel></Input></Main_Zone></YAMAHA_AV>: b''
Invalid XML returned for request <YAMAHA_AV cmd="GET"><Zone_2><Input><Input_Sel>GetParam</Input_Sel></Input></Zone_2></YAMAHA_AV>: b''
Traceback (most recent call last):
File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1700, in close
self.parser.Parse("", 1) # end of data
xml.parsers.expat.ExpatError: no element found: line 1, column 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/rxv/rxv.py", line 184, in _request
response = cElementTree.XML(res.content)
File "/usr/local/lib/python3.8/site-packages/defusedxml/common.py", line 132, in fromstring
return parser.close()
File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1702, in close
self._raiseerror(v)
File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1602, in _raiseerror
raise err
File "<string>", line None
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
I also noticed it’s getting an update error around 4AM every night:
This error originated from a custom integration.
Logger: homeassistant.helpers.entity
Source: custom_components/yamaha/media_player.py:195
Integration: yamaha
First occurred: May 30, 2021, 4:00:17 AM (1 occurrences)
Last logged: May 30, 2021, 4:00:17 AM
Update for media_player.rx_v675 fails
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.8/http/client.py", line 1344, in getresponse
response.begin()
File "/usr/local/lib/python3.8/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.8/http/client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 735, in reraise
raise value
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 447, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='10.30.30.50', port=80): Read timed out. (read timeout=10.0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 316, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_device_update
await task
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/yamaha/media_player.py", line 195, in update
self._play_status = self.receiver.play_status()
File "/usr/local/lib/python3.8/site-packages/rxv/rxv.py", line 574, in play_status
src_name = self._src_name(self.input)
File "/usr/local/lib/python3.8/site-packages/rxv/rxv.py", line 284, in input
response = self._request('GET', request_text)
File "/usr/local/lib/python3.8/site-packages/rxv/rxv.py", line 177, in _request
res = self._session.post(
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 590, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='10.30.30.50', port=80): Read timed out. (read timeout=10.0)