Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2021-06-16 20:25:04 +02:00
parent 569537bb58
commit 954eea9533

View File

@@ -539,6 +539,7 @@ def get_strava_stream(r,metric,stravaid,series_type='time',fetchresolution='high
with open('data.txt', 'w') as outfile: with open('data.txt', 'w') as outfile:
json.dump(s.json(), outfile) json.dump(s.json(), outfile)
try:
for data in s.json(): for data in s.json():
y = None y = None
try: try:
@@ -546,9 +547,11 @@ def get_strava_stream(r,metric,stravaid,series_type='time',fetchresolution='high
return np.array(data['data']) return np.array(data['data'])
except TypeError: # pragma: no cover except TypeError: # pragma: no cover
return None return None
except JSONDecodeError:
return None return None
return None # pragma: no cover
def allmonths(startdate,enddate): def allmonths(startdate,enddate):
d = startdate d = startdate
while d<enddate: while d<enddate: