From f801857884b9db5a7ab9309aa4544f2202eb3e2b Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sat, 7 Oct 2023 23:32:39 +0800 Subject: [PATCH] :bug: Fix setcookie UnicodeEncodeError --- plugins/account/cookies.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/account/cookies.py b/plugins/account/cookies.py index 3b71a90..849ae6b 100644 --- a/plugins/account/cookies.py +++ b/plugins/account/cookies.py @@ -293,6 +293,9 @@ class AccountCookiesPlugin(Plugin.Conversation): logger.warning("用户 %s[%s] 获取账号信息发生错误 [%s]%s", user.full_name, user.id, exc.ret_code, exc.original) await message.reply_text("Stoken 无效,请重新绑定。", reply_markup=ReplyKeyboardRemove()) return ConversationHandler.END + except UnicodeEncodeError: + await message.reply_text("Stoken 非法,请重新绑定。", reply_markup=ReplyKeyboardRemove()) + return ConversationHandler.END try: if client.account_id is None and cookies.is_v2: logger.info("检测到用户 %s[%s] 使用 V2 Cookie 正在尝试获取 account_id", user.full_name, user.id)