From 8f53fa7d2613ac4cd5d787c4f23c9d597075957a Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Tue, 24 Nov 2020 18:02:10 +0100 Subject: [PATCH] fix --- rowers/interactiveplots.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 6b996747..6953500a 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -1555,7 +1555,7 @@ def fitnessfit_chart(workouts,user,workoutmode='water',startdate=None, except: pass - + if len(data)>1: df = pd.concat(data,axis=0) @@ -1719,7 +1719,14 @@ def fitnessfit_chart(workouts,user,workoutmode='water',startdate=None, try: script,div = components(plot) except: - return '','Something went wrong withthe chart' + df.dropna(inplace=True,axis=0,how='any') + return ( + '', + 'Something went wrong withthe chart ({nrworkouts} workouts, {nrdata} datapoints)'.format( + nrworkouts = workouts.count(), + nrdata = len(df), + ) + ) return [script,div]