From 5dfd0a9b503bc3cd7244290c24c4ebcdd08f36f3 Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Thu, 5 Jan 2023 16:15:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0hypercorn=E7=9A=84tro?= =?UTF-8?q?ubleshooting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.py b/main.py index 24460e1e..688adc7e 100644 --- a/main.py +++ b/main.py @@ -126,6 +126,11 @@ def main(first_time_init=False): "mirai-api-http端口无法使用:{}, 请查看 https://github.com/RockChinQ/QChatGPT/issues/22".format( e)) known_exception_caught = True + elif str(e).__contains__("signal only works in main thread"): + logging.error( + "hypercorn异常:{}, 请查看 https://github.com/RockChinQ/QChatGPT/issues/86".format( + e)) + known_exception_caught = True else: logging.error( "捕捉到未知异常:{}, 请前往 https://github.com/RockChinQ/issues 查找或提issue".format(e))