Unable to play routines - Failed to call service media_player/play_media. 'NoneType' object is not iterable
See original GitHub issueDescribe the bug Cannot call routines. Everything else seems to work like TTS. This used to work as of a few days ago so I am not sure what has changed
To Reproduce Steps to reproduce the behavior:
- Go to 'Developer Tools
- Go to Services
- Use media_player.play_media and:
entity_id: media_player.echo_spot
media_content_id: weather
media_content_type: routine
Expected behavior When I try to CALL SERVICE I get: Failed to call service media_player/play_media. ‘NoneType’ object is not iterable
Screenshots
System details
- Home-assistant (version): 2021.01.7
- Hassio (Yes/No): Yes
- alexa_media (version from
const.py
or HA startup): 3.6.2 - alexapy (version from
pip show alexapy
or HA startup): 1.22.2 - Amazon 2FA is enabled (y/n). We will not debug login issues if unanswered: Yes
Logs
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/alexa_media/media_player.py:1273
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 7:47:35 AM (5 occurrences)
Last logged: 7:50:11 AM
[1796920992] 'NoneType' object is not iterable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 135, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1445, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 593, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 664, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 630, in _handle_entity_call
await result
File "/config/custom_components/alexa_media/helpers.py", line 161, in _catch_login_errors
result = await func(*args, **kwargs)
File "/config/custom_components/alexa_media/media_player.py", line 1273, in async_play_media
await self.alexa_api.run_routine(
File "/usr/local/lib/python3.8/site-packages/alexapy/helpers.py", line 146, in wrapper
return await func(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/alexapy/alexaapi.py", line 605, in run_routine
for automation in automations:
TypeError: 'NoneType' object is not iterable
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6
Top Results From Across the Web
'NoneType' object is not iterable - Home Assistant Community
I got this error: 2021-05-10 16:29:41 ERROR (MainThread) [homeassistant.helpers.check_config] Unexpected error validating config Traceback ...
Read more >How to Fix TypeError in Python: NoneType Object Is Not Iterable
The Python TypeError: NoneType Object Is Not Iterable error can be avoided by checking if a value is None or not before iterating...
Read more >TypeError: 'NoneType' object is not iterable in Python
Iterating over a variable that has value None fails: ... I suspect error "'NoneType' object is not iterable in Python" in this case...
Read more >Failed to run example code: 'NoneType' object is not iterable
Hi. When I ran the example code in README, it showed WARNING:root:Failed to import geometry msgs in rigid_transformations.py.
Read more >Python TypeError: 'NoneType' object is not iterable Solution | CK
If you try to iterate over a None object, you encounter the TypeError: 'NoneType' object is not iterable error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok I found the new url. Preparing a new release.
I have the same problem… the routine worked about 4 hours ago and has stopped working in that time. Home Assistant Version: 2021.01.5, Supervisor Version 2021.01.7, media player version 3.6.2 and I do use 2FA.
I also deleted the intergration and reinstalled/reuthorised and the problem persists