From a50041cc9269eeb15c56bb6896f8c5458ea7aa6e Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Tue, 23 May 2017 09:13:52 +0200 Subject: [PATCH] return controlled error for data without time data --- rowers/interactiveplots.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 64df2848..3f714568 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -1438,6 +1438,11 @@ def interactive_flex_chart2(id=0,promember=0, except KeyError: pass + try: + tseconds = rowdata.ix[:,'time'] + except KeyError: + return '','No time data - cannot make flex plot','','' + try: rowdata['x1'] = rowdata.ix[:,xparam] except KeyError: @@ -1447,9 +1452,7 @@ def interactive_flex_chart2(id=0,promember=0, rowdata['y1'] = rowdata.ix[:,yparam1] except KeyError: rowdata['y1'] = 0*rowdata.ix[:,'time'] - - tseconds = rowdata.ix[:,'time'] - + if yparam2 != 'None': try: rowdata['y2'] = rowdata.ix[:,yparam2]