passing all tests on py3
This commit is contained in:
@@ -5,6 +5,8 @@ from __future__ import unicode_literals
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
from rowers.imports import *
|
||||
|
||||
import numpy
|
||||
|
||||
import rowers.mytypes as mytypes
|
||||
from rowers.mytypes import otwtypes
|
||||
|
||||
@@ -305,6 +307,11 @@ def get_userid(access_token):
|
||||
|
||||
return res
|
||||
|
||||
def default(o):
|
||||
if isinstance(o, numpy.int64): return int(o)
|
||||
raise TypeError
|
||||
|
||||
|
||||
def workout_ua_upload(user,w):
|
||||
message = "Uploading to MapMyFitness"
|
||||
uaid = 0
|
||||
@@ -331,7 +338,7 @@ def workout_ua_upload(user,w):
|
||||
}
|
||||
|
||||
url = "https://api.ua.com/v7.1/workout/"
|
||||
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