From c9e932ef43ffcf24f7b99f2c7a3677edef35ceee Mon Sep 17 00:00:00 2001 From: KoalaTrapLord <265133236+KoalaTrapLord@users.noreply.github.com> Date: Thu, 26 Mar 2026 13:44:33 -0400 Subject: [PATCH] fix: correct try: block indentation in run_coaching_session (#105) --- coach/coach_service.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coach/coach_service.py b/coach/coach_service.py index a7b6768..40738e3 100644 --- a/coach/coach_service.py +++ b/coach/coach_service.py @@ -300,7 +300,9 @@ class CoachService: completion_tokens=usage.output_tokens if usage else 0, parsed_json=None, ) - try: cleaned = re.sub(r'^```(?:json)?\s*', '', content.strip()) cleaned = re.sub(r'\s*```$', '', cleaned.strip()) + try: + cleaned = re.sub(r'^```(?:json)?\s*', '', content.strip()) + cleaned = re.sub(r'\s*```$', '', cleaned.strip()) llm_response.parsed_json = json.loads(cleaned) except (json.JSONDecodeError, ValueError): # Try to find JSON object in the text