diff --git a/rowers/tasks.py b/rowers/tasks.py index 07ca5969..01def2df 100644 --- a/rowers/tasks.py +++ b/rowers/tasks.py @@ -265,10 +265,10 @@ def handle_check_race_course(self, row = rdata(csvfile=f1) except IOError: try: - row = rdata(f1 + '.csv') + row = rdata(csvfile=f1 + '.csv') except IOError: try: - row = rdata(f1 + '.gz') + row = rdata(csvfile=f1 + '.gz') except IOError: return 0 @@ -526,13 +526,13 @@ def handle_update_empower(self, havedata = 1 try: - rowdata = rdata(f1) + rowdata = rdata(csvfile=f1) except IOError: try: - rowdata = rdata(f1 + '.csv') + rowdata = rdata(csvfile=f1 + '.csv') except IOError: try: - rowdata = rdata(f1 + '.gz') + rowdata = rdata(csvfile=f1 + '.gz') except IOError: havedata = 0 @@ -597,13 +597,13 @@ def handle_calctrimp(id, engine = create_engine(database_url, echo=False) try: - rowdata = rdata(csvfilename) + rowdata = rdata(csvfile=csvfilename) except IOError: try: - rowdata = rdata(csvfilename + '.csv') + rowdata = rdata(csvfile=csvfilename + '.csv') except IOError: try: - rowdata = rdata(csvfilename + '.gz') + rowdata = rdata(csvfile=csvfilename + '.gz') except IOError: return 0 @@ -719,13 +719,13 @@ def handle_updatedps(useremail, workoutids, debug=False,**kwargs): for wid, f1 in workoutids: havedata = 1 try: - rowdata = rdata(f1) + rowdata = rdata(csvfile=f1) except IOError: try: - rowdata = rdata(f1 + '.csv') + rowdata = rdata(csvfile=f1 + '.csv') except IOError: try: - rowdata = rdata(f1 + '.gz') + rowdata = rdata(csvfile=f1 + '.gz') except IOError: havedata = 0 @@ -1384,12 +1384,12 @@ def handle_otwsetpower(self,f1, boattype, weightvalue, try: - rowdata = rdata(f1) + rowdata = rdata(csvfile=f1) except IOError: try: - rowdata = rdata(f1 + '.csv') + rowdata = rdata(csvfile=f1 + '.csv') except IOError: - rowdata = rdata(f1 + '.gz') + rowdata = rdata(csvfile=f1 + '.gz') weightvalue = float(weightvalue) @@ -1490,13 +1490,13 @@ def handle_updateergcp(rower_id,workoutfilenames,debug=False,**kwargs): therows = [] for f1 in workoutfilenames: try: - rowdata = rdata(f1) + rowdata = rdata(csvfile=f1) except IOError: try: - rowdata = rdata(f1 + '.csv') + rowdata = rdata(csvfile=f1 + '.csv') except IOError: try: - rowdata = rdata(f1 + '.gz') + rowdata = rdata(csvfile=f1 + '.gz') except IOError: rowdata = 0 if rowdata != 0: @@ -1653,9 +1653,9 @@ def handle_makeplot(f1, f2, t, hrdata, plotnr, imagename, ftp=ftp, powerperc=powerperc, powerzones=powerzones) try: - row = rdata(f2, rower=rr) + row = rdata(csvfile=f2, rower=rr) except IOError: - row = rdata(f2 + '.gz', rower=rr) + row = rdata(csvfile=f2 + '.gz', rower=rr) try: haspower = row.df[' Power (watts)'].mean() > 50