Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to play routines - Failed to call service media_player/play_media. 'NoneType' object is not iterable #1149

Closed
oneseventhree opened this issue Jan 27, 2021 · 6 comments · Fixed by #1151
Labels
amazonissue Issue needs to have a change made by Amazon

Comments

@oneseventhree
Copy link

oneseventhree commented Jan 27, 2021

Describe 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:

  1. Go to 'Developer Tools
  2. Go to Services
  3. 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
Screen Shot 2021-01-28 at 7 50 13 am

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

@DENightOne
Copy link

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

@krelltunez
Copy link

Same here. Automation/script to run routine worked last night, now throwing this error. I have not done anything except reboot home assistant earlier today to reflect an unrelated config change.

@broyuken
Copy link

Same here, must be a change on amazons side thats breaking this.

@alandtse
Copy link
Owner

Is this only for routines or do other things like sequences break?

@alandtse alandtse changed the title Failed to call service media_player/play_media. 'NoneType' object is not iterable Unable to play routines - Failed to call service media_player/play_media. 'NoneType' object is not iterable Jan 28, 2021
@alandtse alandtse added the amazonissue Issue needs to have a change made by Amazon label Jan 28, 2021
@alandtse
Copy link
Owner

Looks like Amazon removed the page we needed to find the routines. I'll need to investigate if there's a replacement or not. If there isn't, then we won't be able to do this anymore.

@alandtse
Copy link
Owner

Ok I found the new url. Preparing a new release.

alandtse added a commit that referenced this issue Jan 28, 2021
fix: bump to alexapy 1.22.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amazonissue Issue needs to have a change made by Amazon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants