Echo Devices (Alexa) as Media Player - Testers Needed

I am also getting these errors. It happens when I restart HA, running as a docker on raspberry pi

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi.get_bluetooth:An error occured accessing AlexaAPI: An exception of type AttributeError occurred. Arguments:

("'NoneType' object has no attribute 'json'",)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi.get_device_preferences:An error occured accessing AlexaAPI: An exception of type AttributeError occurred. Arguments:

("'NoneType' object has no attribute 'json'",)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi.get_dnd_state:An error occured accessing AlexaAPI: An exception of type AttributeError occurred. Arguments:

("'NoneType' object has no attribute 'json'",)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi.get_notifications:An error occured accessing AlexaAPI: An exception of type AttributeError occurred. Arguments:

("'NoneType' object has no attribute 'json'",)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexalogin.login:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi.get_devices:An error occured accessing AlexaAPI: An exception of type AttributeError occurred. Arguments:

("'NoneType' object has no attribute 'json'",)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi.get_bluetooth:An error occured accessing AlexaAPI: An exception of type AttributeError occurred. Arguments:

("'NoneType' object has no attribute 'json'",)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi.get_device_preferences:An error occured accessing AlexaAPI: An exception of type AttributeError occurred. Arguments:

("'NoneType' object has no attribute 'json'",)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi.get_dnd_state:An error occured accessing AlexaAPI: An exception of type AttributeError occurred. Arguments:

("'NoneType' object has no attribute 'json'",)

2020-05-12 00:50:20 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)

Did the tts notifications setup changed?As suddenly i’m not getting messages on my echo devices and getting the error bellow.

Error executing script. Unexpected error for call_service at pos 3: send_tts() got an unexpected keyword argument ‘queue_delay’

data:
    type: tts
message: text
target:
   - media.player

@eyalco
Try 2.7.2.

What version are you on for the component and alexapy? It seems you have a mismatch somewhere. You don’t have a /config/alexapy directory do you? If so, delete it.

it was the alexapi folder causing the issue, as moving to hacs i didn’t delete that folder. Thanks for the help and now it’s working again.

Thanks for the suggestion. I updated to 2.7.2 and am having the same problem. When I put my credentials in and click submit it hangs as if it’s doing something, then stops and stays on that credentials page. I tried again clicking advanced debugging to see if it would give me anything in my logs. Both times I’ve clicked submit I can’t find anything in my logs.

EDIT: I have a few errors in my logs from other things but this one seems to pop up every time I try and click submit. Could just be a coincidence though.

Logger: homeassistant.core
Source: core.py:150
First occurred: 11:28:44 AM (7 occurrences)
Last logged: 11:36:24 AM
Error doing job: Unclosed client session
Error doing job: Unclosed connector

I use latest HA docker and this is what is installed:

bash-5.0# pip3 freeze | grep alexa
alexapy==1.8.4

I have 2.7.2 installed, still same issue :frowning:

BTW, this error happens only whenI restart (when HA is already running). Otherwise, if I start the docker it works ok

Thanks for the info. 2.7.3 should handle the restart case.

Still the same :frowning:

2020-05-12 20:34:06 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)

2020-05-12 20:34:06 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)

If I return to 2.7.1 this is the error i see:

2020-05-12 21:20:48 ERROR (MainThread) [alexapy.helpers] alexaapi.get_dnd_state:An error occured accessing AlexaAPI: An exception of type AttributeError occurred. Arguments:

("'NoneType' object has no attribute 'json'",)

2020-05-12 21:20:48 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)

2020-05-12 21:20:48 ERROR (MainThread) [alexapy.helpers] alexaapi.get_notifications:An error occured accessing AlexaAPI: An exception of type AttributeError occurred. Arguments:

("'NoneType' object has no attribute 'json'",)

2020-05-12 21:20:48 ERROR (MainThread) [alexapy.helpers] alexalogin.login:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)

2020-05-12 21:20:48 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)

2020-05-12 21:20:48 ERROR (MainThread) [alexapy.helpers] alexaapi.get_devices:An error occured accessing AlexaAPI: An exception of type AttributeError occurred. Arguments:

("'NoneType' object has no attribute 'json'",)

2020-05-12 21:20:48 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:

('Session is closed',)
1 Like

Dm me your logs please.

I am having exactly the same problem. It started after upgrading to v2.7.2

1 Like

Upgrade to 2.7.3 2.7.5. Sorry trying to resolve this so iterating quickly.

1 Like

upgraded to 2.7.5 … not solved

2020-05-13 08:48:02 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:
(‘Session is closed’,)
2020-05-13 08:48:02 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:
(‘Session is closed’,)
2020-05-13 08:48:02 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:
(‘Session is closed’,)
2020-05-13 08:48:02 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:
(‘Session is closed’,)
2020-05-13 08:48:02 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:
(‘Session is closed’,)
2020-05-13 08:48:02 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:
(‘Session is closed’,)
2020-05-13 08:48:02 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:
(‘Session is closed’,)
2020-05-13 08:48:02 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:
(‘Session is closed’,)
2020-05-13 08:48:02 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:
(‘Session is closed’,)

Same
Was such a tight loop it stopped HA coming up fully.
I had to disable via configuration.yaml and restart HA

If its any help I am getting the same error, with not being able to add the Alexa Media Integration using amazon.co.uk as the region. I then changed the Amazon region to amazon.com and then I could enter the captcha and 2fa credentials. Integration added successfully after that.

> alexalogin.login:An error occured accessing AlexaAPI: An exception of type AssertionError occurred. Arguments: ()

Alexa Media V2.75
Home Assistant 0.109.6

@PaulWebster @jamos
Please provide logs either through a DM or through Github if you’d like help. I can’t reproduce your error.

1 Like

Hey Everyone! It has been a while since I posted here, but I wanted to share something I’ve been working on for a little while now. I hope you enjoy it as much as much as I do.

Alexa Actions

Alexa Actions is a custom Alexa skill coupled with a Home Assistant setup and configuration guide to enable Actionable Notifications for your automations to your Alexa devices.

This provides the ability for your Alexa devices to make queries and await your response.

Example

Alexa: “I’ve noticed the front door has been unlocked for 5 mins, would you like me to lock it?”

You: “Yes”

The door locks

Getting Started

To get started, head over to the Alexa Actions GitHub Page.

8 Likes

for some reason it doesn’t happen anymore

Thanks, I’ve installed a clean Home Assistant image and the Alexa Media Integration with Region set to amazon.co.uk now works ok. I’ll migrate everything to to my new install as I have about 3 years worth of upgrades and patches on my current system so probably some old config conflicting with this.

I was getting these - multiple times per second


2020-05-14 08:22:13 ERROR (MainThread) [alexapy.helpers] alexalogin.login:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:
('Session is closed',)
2020-05-14 08:22:13 ERROR (MainThread) [alexapy.helpers] alexaapi._static_request:An error occured accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:
('Session is closed',)
2020-05-14 08:22:13 ERROR (MainThread) [alexapy.helpers] alexaapi.get_devices:An error occured accessing AlexaAPI: An exception of type AttributeError occurred. Arguments:
("'NoneType' object has no attribute 'json'",)

However, that I all that I kept from the log before removing config data and restarting HA - after which the log has been flushed.
Note - mine is also configured to use amazon.co.uk

I can try again at some point over the coming weekend.