core: Yamaha Network Receiver play_media error
The problem
The latest Home Assistant Docker version contains Python 3.9. It seems this is an issue for the Yamaha Network Receiver integration. When trying to execute media_player.play_media the following error occurs:
AttributeError: ‘xml.etree.ElementTree.Element’ object has no attribute ‘getchildren’
What is version of Home Assistant Core has the issue?
2021.7.2
What was the last working version of Home Assistant Core?
versions with python 3.8.x
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Yamaha Network Receiver
Link to integration documentation on our website
No response
Example YAML snippet
- service: media_player.play_media
data_template:
entity_id: media_player.yamaha_avr_wz
media_content_type: "NET RADIO"
media_content_id: >
{% if is_state('input_select.internet_radio_channels', 'Rock Antenne') %} Radio>Favoriten>ROCK ANTENNE
{% elif is_state('input_select.internet_radio_channels', 'Radio BOB') %} Radio>Favoriten>RADIO BOB! - National
{% elif is_state('input_select.internet_radio_channels', 'Top FM') %} Radio>Favoriten>Radio TOP FM - Region WEST
{% else %}
Radio>Favoriten>ROCK ANTENNE
{% endif %}
Anything in the logs that might be useful for us?
2021-07-13 09:35:14 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
home-assistant | Traceback (most recent call last):
home-assistant | File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 404, in _async_run
home-assistant | return await self.script.async_run(variables, context)
home-assistant | File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1219, in async_run
home-assistant | await asyncio.shield(run.async_run())
home-assistant | File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 353, in async_run
home-assistant | await self._async_step(log_exceptions=False)
home-assistant | File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
home-assistant | await getattr(self, handler)()
home-assistant | File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 574, in _async_call_service_step
home-assistant | await self._async_run_long_action(service_task)
home-assistant | File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 535, in _async_run_long_action
home-assistant | long_task.result()
home-assistant | File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
home-assistant | task.result()
home-assistant | File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
home-assistant | await handler.job.target(service_call)
home-assistant | File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 278, in service_handler
home-assistant | await script_entity.async_turn_on(
home-assistant | File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 382, in async_turn_on
home-assistant | await coro
home-assistant | File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 404, in _async_run
home-assistant | return await self.script.async_run(variables, context)
home-assistant | File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1219, in async_run
home-assistant | await asyncio.shield(run.async_run())
home-assistant | File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 353, in async_run
home-assistant | await self._async_step(log_exceptions=False)
home-assistant | File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
home-assistant | await getattr(self, handler)()
home-assistant | File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step
home-assistant | await service_task
home-assistant | File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
home-assistant | task.result()
home-assistant | File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
home-assistant | await handler.job.target(service_call)
home-assistant | File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
home-assistant | await self.hass.helpers.service.entity_service_call(
home-assistant | File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
home-assistant | future.result() # pop exception if have
home-assistant | File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 811, in async_request_call
home-assistant | await coro
home-assistant | File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
home-assistant | await result
home-assistant | File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 691, in async_play_media
home-assistant | await self.hass.async_add_executor_job(
home-assistant | File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
home-assistant | result = self.fn(*self.args, **self.kwargs)
home-assistant | File "/usr/src/homeassistant/homeassistant/components/yamaha/media_player.py", line 404, in play_media
home-assistant | self.receiver.net_radio(media_id)
home-assistant | File "/usr/local/lib/python3.9/site-packages/rxv/rxv.py", line 632, in net_radio
home-assistant | menu = self.menu_status()
home-assistant | File "/usr/local/lib/python3.9/site-packages/rxv/rxv.py", line 508, in menu_status
home-assistant | for elt in current_list.getchildren()
home-assistant | AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren'
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 16 (1 by maintainers)
This is exactly what we are doing here: raising an issue with this compoanent. But it seems this is not very high on their priority list. Too few people complaining.