From 8e41733e58719ae3d47c6ca965fab55ee8bafdfa Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Thu, 13 Jan 2022 19:34:38 +0100 Subject: [PATCH] fix --- rowers/nkstuff.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rowers/nkstuff.py b/rowers/nkstuff.py index 27f5eebb..5e79d566 100644 --- a/rowers/nkstuff.py +++ b/rowers/nkstuff.py @@ -10,6 +10,7 @@ from time import strftime import requests from rowers.utils import dologging +from json.decoder import JSONDecodeError #https:#oauth-stage.nkrowlink.com/oauth/authorizegrant_type=authorization_code&response_type=code&client_id=rowsandall-staging&scope=read&state=fc8fc3d8-ce0a-443e-838a-1c06fb5317c6&redirect_uri=https%3A%2F%2Fdunav.ngrok.io%2Fnk_callback%2F #https:#oauth-stage.nkrowlink.com/oauth/authorize?grant_type=authorization_code&response_type=code&client_id=rowsandall-staging&scope=read&state=1234&redirect_uri=https%3A%2F%2Fdev.rowsandall.com%2Fnk_callback @@ -143,7 +144,7 @@ def get_nk_workouts(rower, do_async=True,before=0,after=0): with open('nkblocked.json','r') as nkblocked: jsondata = json.load(nkblocked) parkedids = jsondata['ids'] - except FileNotFoundError: # pragma: no cover + except (FileNotFoundError,JSONDecodeError): # pragma: no cover pass knownnkids = uniqify(knownnkids+tombstones+parkedids)