diff --git a/rowers/tasks.py b/rowers/tasks.py index 17145607..f64eafc9 100644 --- a/rowers/tasks.py +++ b/rowers/tasks.py @@ -412,7 +412,7 @@ def handle_check_race_course(self, rowdata.fillna(method='backfill',inplace=True) - rowdata['time'] = rowdata['time']-rowdata.ix[0,'time'] + rowdata['time'] = rowdata['time']-rowdata.loc[0,'time'] rowdata = rowdata[rowdata['time']>splitsecond] # we may want to expand the time (interpolate) rowdata['dt'] = rowdata['time'].apply( @@ -1972,7 +1972,7 @@ def handle_otwsetpower(self,f1, boattype, weightvalue, totaltime = rowdata.df['TimeStamp (sec)'].max( ) - rowdata.df['TimeStamp (sec)'].min() try: - totaltime = totaltime + rowdata.df.ix[0, ' ElapsedTime (sec)'] + totaltime = totaltime + rowdata.df.loc[0, ' ElapsedTime (sec)'] except KeyError: pass df = getsmallrowdata_db( @@ -2733,6 +2733,7 @@ def fetch_strava_workout(stravatoken,oauth_data,stravaid,csvfilename,userid,debu url = "https://www.strava.com/api/v3/activities/"+str(stravaid) response = requests.get(url,headers=headers) if response.status_code != 200: + t = time.localtime() timestamp = time.strftime('%b-%d-%Y_%H%M', t) with open('strava_webhooks.log','a') as f: f.write('\n') @@ -2972,6 +2973,7 @@ def fetch_strava_workout(stravatoken,oauth_data,stravaid,csvfilename,userid,debu session.headers.update(newHeaders) response = session.post(UPLOAD_SERVICE_URL,json=uploadoptions) + t = time.localtime() timestamp = time.strftime('%b-%d-%Y_%H%M', t) with open('strava_webhooks.log','a') as f: f.write('\n')