From 68ed73dd89a07c7e5d84d08ef4a79aaf5f6d466f Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 25 Apr 2023 23:23:47 -0300 Subject: [PATCH] Make API extension print its exceptions --- extensions/api/util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/api/util.py b/extensions/api/util.py index cb9d9d06..343aa75b 100644 --- a/extensions/api/util.py +++ b/extensions/api/util.py @@ -1,7 +1,8 @@ - -from threading import Thread import time +import traceback +from threading import Thread from typing import Callable, Optional + from modules.text_generation import encode @@ -64,6 +65,7 @@ def _start_cloudflared(port: int, max_attempts: int = 3, on_start: Optional[Call return except Exception: + traceback.print_exc() time.sleep(3) raise Exception('Could not start cloudflared.')