pragma
This commit is contained in:
@@ -539,15 +539,18 @@ 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)
|
||||||
|
|
||||||
for data in s.json():
|
try:
|
||||||
y = None
|
for data in s.json():
|
||||||
try:
|
y = None
|
||||||
if data['type'] == metric:
|
try:
|
||||||
return np.array(data['data'])
|
if data['type'] == metric:
|
||||||
except TypeError: # pragma: no cover
|
return np.array(data['data'])
|
||||||
return None
|
except TypeError: # pragma: no cover
|
||||||
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user