diff --git a/rowers/tasks.py b/rowers/tasks.py index 41e28396..a037a37d 100644 --- a/rowers/tasks.py +++ b/rowers/tasks.py @@ -359,7 +359,7 @@ def uploadactivity(access_token, filename, description='', with gzip.GzipFile(fileobj=data_gz, mode="w") as gzf: gzf.write(s) except FileNotFoundError: - return 0 + return 0, 0, 0, 0 headers = { 'Content-Type': 'application/json', @@ -2644,8 +2644,12 @@ def handle_makeplot(f1, f2, t, hrdata, plotnr, imagename, nr_rows = len(row.df) if (plotnr in [1, 2, 4, 5, 8, 11, 9, 12]) and (nr_rows > 1200): # pragma: no cover bin = int(nr_rows / 1200.) - df = row.df.groupby(lambda x: x / bin).mean() - row.df = df + try: + df = df.select_types(['number']) + df = row.df.groupby(lambda x: x / bin).mean() + row.df = df + except TypeError: + pass nr_rows = len(row.df) if (plotnr == 1): fig1 = row.get_timeplot_erg(t, pacerange=oterange, **kwargs) diff --git a/rowers/tests/testdata/testdata.tcx.gz b/rowers/tests/testdata/testdata.tcx.gz index 36a4f214..7d923d8c 100644 Binary files a/rowers/tests/testdata/testdata.tcx.gz and b/rowers/tests/testdata/testdata.tcx.gz differ