passing all tests on py3
This commit is contained in:
@@ -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 ):
|
||||
|
||||
Reference in New Issue
Block a user