ethanopp / fitly

Self hosted web analytics for endurance athletes
MIT License
184 stars 24 forks source link

Cycling Distance on Performance page fails to render #17

Closed spawn-github closed 3 years ago

spawn-github commented 3 years ago

Hi!

On the Performance page, the lower right display fails to render any of the cycling options. Each one I select (distance, duration, HrSS, etc) results in the following being logged:

Exception on /_dash-update-component [POST] Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python3.7/site-packages/dash/dash.py", line 1076, in dispatch response.set_data(func(*args, outputs_list=outputs_list)) File "/usr/local/lib/python3.7/site-packages/dash/dash.py", line 1007, in add_context output_value = func(*args, **kwargs) # %% callback invoked %% File "/app/src/fitly/pages/performance.py", line 3429, in update_yoy_chart figure, hoverData = create_yoy_chart(sport=sport, metric=metric) File "/app/src/fitly/pages/performance.py", line 1870, in create_yoy_chart line={'shape': 'spline', 'color': colors[index]}, IndexError: list index out of range As always, happy to provide any additional info. Thanks!

ethanopp commented 3 years ago

How many years worth of data do you have for cycling activities?

ethanopp commented 3 years ago

Think this may have been the issue https://github.com/ethanopp/fitly/commit/6b6ccf5cb4dc80bc6110d9fcd9de913c0124dd86

Please try pulling latest and let me know

spawn-github commented 3 years ago

Have ~5 years worth of data loaded.

And yep, pulling latest has those graphs rendering now. Thanks!