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

Alexa Guard: TypeError: 'NoneType' object is not subscriptable in init #243

Closed
alandtse opened this issue Jul 5, 2019 · 4 comments · Fixed by #267
Closed

Alexa Guard: TypeError: 'NoneType' object is not subscriptable in init #243

alandtse opened this issue Jul 5, 2019 · 4 comments · Fixed by #267
Labels
bug Something isn't working

Comments

@alandtse
Copy link
Owner

alandtse commented Jul 5, 2019

Site note (I think not relevant within this issue): The log has an error during setup of component:

2019-07-04 10:28:24 ERROR (MainThread) [homeassistant.components.alarm_control_panel] Error while setting up platform alexa_media
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/alexa_media/alarm_control_panel.py", line 35, in setup_platform
    hass)  \
  File "/config/custom_components/alexa_media/alarm_control_panel.py", line 88, in __init__
    guard_dict = (data['locationDetails']
TypeError: 'NoneType' object is not subscriptable

That is because, alexa guard is not yet available in germany.

Originally posted by @lweberru in https://github.com/keatontaylor/alexa_media_player/issues/242#issuecomment-508400440

@monsieurlatte
Copy link

monsieurlatte commented Jul 7, 2019

Just a heads up, I'm not in Germany and I too am seeing this (I am in the U.S.).

Sun Jul 07 2019 07:14:24 GMT-0700 (Pacific Daylight Time) Error doing job: Future exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/alexa_media/alarm_control_panel.py", line 95, in _handle_event self.refresh() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 224, in wrapper result = method(*args, **kwargs) File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 224, in wrapper result = method(*args, **kwargs) File "/config/custom_components/alexa_media/alarm_control_panel.py", line 106, in refresh if state_json['deviceStates']: TypeError: 'NoneType' object is not subscriptable

@alandtse
Copy link
Owner Author

alandtse commented Jul 7, 2019

@monsieurlatte Just to check, did you set up Alexa Guard? That is also the cause of the error. There is a PR that should resolve this if you want to check it. #245

@monsieurlatte
Copy link

monsieurlatte commented Jul 7, 2019 via email

@alandtse
Copy link
Owner Author

alandtse commented Jul 7, 2019

@monsieurlatte oh wait, I didn't read your logs fully, that's a different issue. I'm going to move this to a different issue so please respond there.

@alandtse alandtse changed the title Alexa Guard: TypeError: 'NoneType' object is not subscriptable Alexa Guard: TypeError: 'NoneType' object is not subscriptable in init Jul 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants