ehForwarderBot / efb-wechat-slave

A channel for EH Forwarder Bot.
GNU Affero General Public License v3.0
459 stars 62 forks source link

EOFError: Ran out of input #104

Closed shzxm closed 4 years ago

shzxm commented 4 years ago

登陆时出现问题

Traceback (most recent call last):
  File "/usr/local/bin/ehforwarderbot", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/ehforwarderbot/__main__.py", line 277, in main
    init(conf)
  File "/usr/local/lib/python3.8/dist-packages/ehforwarderbot/__main__.py", line 91, in init
    coordinator.add_channel(cls(instance_id=instance_id))
  File "/usr/local/lib/python3.8/dist-packages/efb_wechat_slave/__init__.py", line 157, in __init__
    self.authenticate('console_qr_code', first_start=True)
  File "/usr/local/lib/python3.8/dist-packages/efb_wechat_slave/__init__.py", line 668, in authenticate
    self.bot.enable_puid(
  File "/usr/local/lib/python3.8/dist-packages/efb_wechat_slave/vendor/wxpy/api/bot.py", line 181, in enable_puid
    self.puid_map = PuidMap(path, puid_logs)
  File "/usr/local/lib/python3.8/dist-packages/efb_wechat_slave/vendor/wxpy/utils/puid_map.py", line 114, in __init__
    self.load()
  File "/usr/local/lib/python3.8/dist-packages/efb_wechat_slave/vendor/wxpy/utils/puid_map.py", line 263, in load
    self.user_names, self.wxids, self.remark_names, self.captions = pickle.load(fp)
EOFError: Ran out of input

文件我已经检查. 也已经更新过了

/usr/local/lib/python3.8/dist-packages/efb_wechat_slave/vendor/wxpy/utils/puid_map.py

文件不为空 文件内容 puid_map.txt

shzxm commented 4 years ago

已经重装过一次系统了.只有安装完的第一次可以正常使用. 之后关闭重新开启就会出现这个问题

blueset commented 4 years ago

这个是 wxpy_puid.pkl 文件被损坏造成的。请尝试删除这个文件 ($HOME/.ehforwarderbot/profiles/default/blueset.wechat/wxpy_puid.pkl) 然后重试。

请注意 EWS 同其他组件一样,可能需要在关闭时做一些善后处理。强行退出程序或使用 SIGKILL 等信号退出程序时有可能造成数据损坏。