From 4e54c24bf0559b380dcaede54b111be94bdd96b0 Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Tue, 17 Jan 2023 17:34:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0did=20not=20receive?= =?UTF-8?q?=20a=20valid=20HTTP=20response=E7=9A=84troubleshooting=20(#103)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index 5c831ae..655fe73 100644 --- a/main.py +++ b/main.py @@ -174,6 +174,10 @@ def main(first_time_init=False): "hypercorn异常:{}, 请查看 https://github.com/RockChinQ/QChatGPT/issues/86".format( e)) known_exception_caught = True + elif str(e).__contains__("did not receive a valid HTTP"): + logging.error( + "mirai-api-http端口无法使用:{}, 请参考 https://github.com/RockChinQ/QChatGPT/issues/22 更换端口".format( + e)) else: logging.error( "捕捉到未知异常:{}, 请前往 https://github.com/RockChinQ/QChatGPT/issues 查找或提issue".format(e))