Netatmo Weather Station error: TypeError: 'NoneType' object is not subscriptable

Hello,

I’m having trouble enabling my Netatmo Weather station sensors.

The error I’m getting is as follows:

2019-02-20 21:45:48 ERROR (MainThread) [homeassistant.setup] Error during setup of component netatmo
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/mariuskaase/.homeassistant/custom_components/netatmo.py", line 54, in setup
    'read_station read_camera access_camera '
  File "/Users/mariuskaase/.homeassistant/deps/lib/python/site-packages/pyatmo.py", line 80, in __init__
    self._accessToken = resp["access_token"]
TypeError: 'NoneType' object is not subscriptable

The API application is enabled, the secret and key is correct. I’ve been searching everywhere for other people having similar problems, but to no avail.

Hi there,

I have the exact same issue. I tried the home coach and the weather station both as standalone. Same result for both and I do not have any clue currently.

I found this old issue: https://github.com/home-assistant/home-assistant/issues/11040 but I think I checked all the input that was given there.

Exact same issue for me. I have tried different Versions of HA but still got this issue.

Hey, got this error since 2 or 3 weeks and block the netatmo weather sensor until I restart HA.

It can work 1 day or 2 (or less) then block on this error again.

Something new on this plugin ? (worked well before .90)

Thanks

The next release (0.95) contains a few Netatmo related changes which hopefully remedy at least some of the issues.

Seems better since 0.95.1 so far. Let see if it will stay stable.

Thx all

1 Like

Hey,

I’m getting the same issue, based on the release notes it should have been fixed already, but i’m running 0.95.4 in a docker container on my Synology NAS and it still throws this error:

Sat Jul 13 2019 13:55:43 GMT+0200 (Central European Summer Time)
Error while setting up platform netatmo
Traceback (most recent call last):
  File "/usr/src/app/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 "/usr/src/app/homeassistant/components/netatmo/sensor.py", line 156, in setup_platform
    config.get(CONF_STATION)))
  File "/usr/src/app/homeassistant/components/netatmo/sensor.py", line 199, in __init__
    self._module_type = module['type']
TypeError: 'NoneType' object is not subscriptable

Any pointers on how I can fix this issue?

Thanks in advance!

  1. Please log into the Netatmo developer page.
  2. Then go to Netatmo Weather - Getstationsdata, click that yellow arrow and hit try it.
    image
  3. Check the results and maybe send me the results via Discord/email/HA-forum PM

A subscriptable object is any object that implements the getitem special method (think lists, dictionaries). It is an object that records the operations done to it and it can store them as a “script” which can be replayed. You are trying to subscript an object which you think is a list or dict, but actually is None. NoneType is the type of the None object which represents a lack of value, for example, a function that does not explicitly return a value will return None. ‘NoneType’ object is not subscriptable is the one thrown by python when you use the square bracket notation object[key] where an object doesn’t define the getitem method .

1 Like