Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 登陆时报错 xml.parsers.expat.ExpatError: mismatched tag: line 63, column 4 #132

Closed
yangsheng6810 opened this issue Feb 9, 2022 · 2 comments
Labels

Comments

@yangsheng6810
Copy link

版本信息 Version Info

EH Forwarder Bot
版本: 2.1.1
Python 版本:
3.9.10 (main, Jan 16 2022, 17:12:18)
[GCC 11.2.0]
正在使用配置文件「default」。

主端:
Telegram Master (blueset.telegram) 2.2.4 # 默认实例

从端:
WeChat Slave (blueset.wechat) 2.0.7 # WeChat

中间件:
尚未启用任何中间件。

问题描述 Describe the bug

之前一直可以工作。可能session到期,重新扫码登陆失败。尝试登陆网页版,第一次失败,第二次和后续尝试均成功,可以正常使用网页版。

重现步骤 To Reproduce

重新扫码登陆微信

截图 Screenshots

N/A

Verbose 日志 Log

Verbose 日志
2022-02-09 15:57:10,287 [Level 99]: plugins.blueset.wechat.WeChatChannel (__init__.console_qr_code; __init__.py:195)
    请在手机上确认。
Traceback (most recent call last):
  File "/home/yangsheng/.local/bin/ehforwarderbot", line 8, in <module>
    sys.exit(main())
  File "/home/yangsheng/.local/lib/python3.9/site-packages/ehforwarderbot/__main__.py", line 335, in main
    init(conf)
  File "/home/yangsheng/.local/lib/python3.9/site-packages/ehforwarderbot/__main__.py", line 135, in init
    coordinator.add_channel(cls(instance_id=instance_id))
  File "/home/yangsheng/.local/lib/python3.9/site-packages/efb_wechat_slave/__init__.py", line 160, in __init__
    self.authenticate('console_qr_code', first_start=True)
  File "/home/yangsheng/.local/lib/python3.9/site-packages/efb_wechat_slave/__init__.py", line 672, in authenticate
    self.bot: wxpy.Bot = wxpy.Bot(cache_path=str(efb_utils.get_data_path(self.channel_id) / "wxpy.pkl"),
  File "/home/yangsheng/.local/lib/python3.9/site-packages/efb_wechat_slave/vendor/wxpy/api/bot.py", line 85, in __init__
    self.core.auto_login(
  File "/home/yangsheng/.local/lib/python3.9/site-packages/efb_wechat_slave/vendor/itchat/components/register.py", line 32, in auto_login
    self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback,
  File "/home/yangsheng/.local/lib/python3.9/site-packages/efb_wechat_slave/vendor/itchat/components/login.py", line 58, in login
    status = self.check_login()
  File "/home/yangsheng/.local/lib/python3.9/site-packages/efb_wechat_slave/vendor/itchat/components/login.py", line 171, in check_login
    if process_login_info(self, r.text):
  File "/home/yangsheng/.local/lib/python3.9/site-packages/efb_wechat_slave/vendor/itchat/components/login.py", line 211, in process_login_info
    for node in xml.dom.minidom.parseString(r.text).documentElement.childNodes:
  File "/usr/lib/python3.9/xml/dom/minidom.py", line 1998, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python3.9/xml/dom/expatbuilder.py", line 925, in parseString
    return builder.parseString(string)
  File "/usr/lib/python3.9/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: mismatched tag: line 63, column 4

备注 Additional context

可能跟 #131 是同样的问题。鉴于 #131 的报告者无法使用网页版,而我这里可以正常使用网页版,可能是不一样的情况,因此另开一个issue。

@yangsheng6810
Copy link
Author

尝试了清除session文件之后成功登陆了。万一有后来者:

请尝试将您的登陆 Session 清除后重新登录。Session 文件存储在 EFB_DATA_PATH/profiles/<YOUR_PROFILE>/blueset.wechat/wxpy.pkl.

@Martinho0330
Copy link

出现了一样的报错,但是我的目录下并没有wxpy.pkl这个文件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants