fix
This commit is contained in:
@@ -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)
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
Reference in New Issue
Block a user