From aee01a1a4aee9001ee384ebf4e2bbd60034dcfa9 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Sun, 15 Dec 2024 19:27:11 +0100 Subject: [PATCH] fix --- rowers/integrations/trainingpeaks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rowers/integrations/trainingpeaks.py b/rowers/integrations/trainingpeaks.py index 8dbefd35..93a73089 100644 --- a/rowers/integrations/trainingpeaks.py +++ b/rowers/integrations/trainingpeaks.py @@ -67,7 +67,10 @@ class TPIntegration(SyncIntegration): except TypeError: newnotes = 'from '+w.workoutsource+' via rowsandall.com' - row.exporttotcx(tcxfilename, notes=newnotes, sport=tpmapping[w.workouttype]) + try: + row.exporttotcx(tcxfilename, notes=newnotes, sport=tpmapping[w.workouttype]) + except KeyError: + row.exporttotcx(tcxfilename, notes=newnotes, sport='other') return tcxfilename