Closed AFI4711 closed 6 days ago
Another simple Test shows a similiar error: simpleTest.py:
import lnetatmo
authorization = lnetatmo.ClientAuth()
weather = lnetatmo.WeatherStationData(authorization)
user = weather.user
print("Station owner : ", user.mail)
print("Data units : ", user.unit)
devList = lnetatmo.WeatherStationData(authorization)
print ("Current temperature (inside/outside): %s / %s °C" %
( devList.lastData()['Weather Station']['Temperature'],
devList.lastData()['Outdoor Module']['Temperature'])
)
the error:
./simpleTest.py
Station owner : andreas@finkel.de
Data units : metric
Traceback (most recent call last):
File "/home/andi/docker/netatmo_neu/netatmo-api-python-master/./simpleTest.py", line 27, in <module>
( devList.lastData()['Weather Station']['Temperature'],
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
This is the behavior you would have if you don't have any weather station in your account (or that you scope do not allow to find them).
Check that you have the required scope (see https://github.com/philippelt/netatmo-api-python/issues/56#issuecomment-1638546613)
Strange, I'll use your software a long time running successfully. Perhaps there are some problems with Netatmo. I'll create new credentials and try again. Many thanks so far.
In the last two weeks, I experienced between 2 and 8 requests failure per day to netatmo servers. It seems improving now.
Generation of new TOKENS and/or CLIENT_IDs brought no improvement. Since I found no data of my "Weather Station" on Netatmo Homepage (https://home.netatmo.com/control/dashboard ) I restarted the Weather Station (since new. Now everything is running fine. This is so embarrassing, sorry for the Inconveniences.
Now I get the following error everytime when calling: