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,15 +539,18 @@ def get_strava_stream(r,metric,stravaid,series_type='time',fetchresolution='high
with open('data.txt', 'w') as outfile:
json.dump(s.json(), outfile)
for data in s.json():
y = None
try:
if data['type'] == metric:
return np.array(data['data'])
except TypeError: # pragma: no cover
return None
try:
for data in s.json():
y = None
try:
if data['type'] == metric:
return np.array(data['data'])
except TypeError: # pragma: no cover
return None
except JSONDecodeError:
return None
return None
return None # pragma: no cover
def allmonths(startdate,enddate):
d = startdate