You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into an error when displaying an asset which has only public sensors (a weather station):
[FLEXMEASURES][2022-10-13 13:06:39,484] ERROR: AttributeError:"'NoneType' object has no attribute 'id'" [occurred at /home/nicolas/workspace/seita/flexmeasures/flexmeasures/data/services/sensors.py(get_sensors):26,URL was: /api/v3_0/assets/10/chart/]
Traceback (most recent call last):
File "/home/nicolas/envs/fm-venv/lib/python3.10/site-packages/flask/app.py", line 1523, in full_dispatch_request
rv = self.dispatch_request()
File "/home/nicolas/envs/fm-venv/lib/python3.10/site-packages/flask/app.py", line 1509, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/home/nicolas/envs/fm-venv/lib/python3.10/site-packages/flask_classful.py", line 268, in proxy
response = view(**request.view_args)
File "/home/nicolas/envs/fm-venv/lib/python3.10/site-packages/flask_classful.py", line 239, in inner
return fn(*args, **kwargs)
File "/home/nicolas/envs/fm-venv/lib/python3.10/site-packages/webargs/core.py", line 594, in wrapper
return func(*args, **kwargs)
File "/home/nicolas/envs/fm-venv/lib/python3.10/site-packages/webargs/core.py", line 594, in wrapper
return func(*args, **kwargs)
File "/home/nicolas/workspace/seita/flexmeasures/flexmeasures/auth/decorators.py", line 154, in decorated_view
return fn(*args, **kwargs)
File "/home/nicolas/workspace/seita/flexmeasures/flexmeasures/api/v3_0/assets.py", line 287, in get_chart
return json.dumps(asset.chart(**kwargs))
File "/home/nicolas/workspace/seita/flexmeasures/flexmeasures/data/models/generic_assets.py", line 296, in chart
sensors = self.sensors_to_show
File "/home/nicolas/workspace/seita/flexmeasures/flexmeasures/data/models/generic_assets.py", line 451, in sensors_to_show
for sensor in get_sensors(
File "/home/nicolas/workspace/seita/flexmeasures/flexmeasures/data/services/sensors.py", line 26, in get_sensors
account_ids = [account.id]
AttributeError: 'NoneType' object has no attribute 'id'
This error wasn't happening on main recently, so I believe it was introduced with #500 .
The text was updated successfully, but these errors were encountered:
I ran into an error when displaying an asset which has only public sensors (a weather station):
This error wasn't happening on main recently, so I believe it was introduced with #500 .
The text was updated successfully, but these errors were encountered: