Private
Public Access
1
0

passing all tests on py3

This commit is contained in:
Sander Roosendaal
2019-02-28 22:52:59 +01:00
parent ee4fa4c3b8
commit faeea73b0a
14 changed files with 76 additions and 21 deletions

View File

@@ -29,6 +29,8 @@ oauth_data = {
}
import numpy
def splitrunkeeperlatlongdata(lijst,tname,latname,lonname):
t = []
lat = []
@@ -262,6 +264,10 @@ def get_userid(access_token):
return str(res)
def default(o):
if isinstance(o, numpy.int64): return int(o)
raise TypeError
def workout_runkeeper_upload(user,w):
message = "Uploading to Runkeeper"
rkid = 0
@@ -287,7 +293,7 @@ def workout_runkeeper_upload(user,w):
'Content-Length':'nnn'}
url = "https://api.runkeeper.com/fitnessActivities"
response = requests.post(url,headers=headers,data=json.dumps(data))
response = requests.post(url,headers=headers,data=json.dumps(data,default=default))
# check for duplicate error first
if (response.status_code == 409 ):