WXFileHelper icon indicating copy to clipboard operation
WXFileHelper copied to clipboard

登陆后代码直接报错

Open iswbm opened this issue 3 years ago • 2 comments

在如下位置报错

            data = resp.json()
            if data['BaseResponse']['Ret'] == 0:
                self.message.username = data['User']['NickName']
                self.message.username_hash = data['User']['UserName']
                self.message.sync_key = data['SyncKey']
                self.message.webwx_data_ticket = self.wx_req.session.cookies.get(
                    "webwx_data_ticket")

                print(
                    f"\rLogin success, Welcome [{self.message.username}]~", end='\n\n')

                return True
            else:
                raise ValueError("Webwxinit failed")

报错截图如下

image

打印的 data 信息

{'BaseResponse': {'Ret': 1100, 'ErrMsg': ''}, 'Count': 0, 'ContactList': [], 'SyncKey': {'Count': 0, 'List': []}, 'User': {'Uin': 0, 'UserName': '', 'NickName': '', 'HeadImgUrl': '', 'RemarkName': '', 'PYInitial': '', 'PYQuanPin': '', 'RemarkPYInitial': '', 'RemarkPYQuanPin': '', 'HideInputBarFlag': 0, 'StarFriend': 0, 'Sex': 0, 'Signature': '', 'AppAccountFlag': 0, 'VerifyFlag': 0, 'ContactFlag': 0, 'WebWxPluginSwitch': 0, 'HeadImgFlag': 0, 'SnsFlag': 0}, 'ChatSet': '', 'SKey': '', 'ClientVersion': 0, 'SystemTime': 0, 'GrayScale': 0, 'InviteStartCount': 0, 'MPSubscribeMsgCount': 0, 'MPSubscribeMsgList': [], 'ClickReportInterval': 0}

iswbm avatar May 12 '22 14:05 iswbm

确实存在这个问题,部分账号需要更换 HOST

# WX_FILEHELPER_HOST = "https://szfilehelper.weixin.qq.com"
WX_FILEHELPER_HOST = "https://filehelper.weixin.qq.com"

zzzzls avatar May 12 '22 15:05 zzzzls

确实存在这个问题,部分账号需要更换 HOST

# WX_FILEHELPER_HOST = "https://szfilehelper.weixin.qq.com"
WX_FILEHELPER_HOST = "https://filehelper.weixin.qq.com"

确实 OK 了,感谢回复

iswbm avatar May 12 '22 15:05 iswbm