ehForwarderBot / efb-wechat-slave

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

[BUG] 无法运行 EFB #103

Closed mlch911 closed 4 years ago

mlch911 commented 4 years ago

Describe the bug

无法运行 EFB,去掉所有中间件后,能出微信的扫码,但扫码后依旧报错

去掉中间件后,可以扫码,扫码后便报错

Traceback (most recent call last):                                                                                                                     
  File "/usr/local/bin/ehforwarderbot", line 11, in <module>                                                                                           
    load_entry_point('ehforwarderbot==2.0.0', 'console_scripts', 'ehforwarderbot')()                                                                   
  File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/__main__.py", line 277, in main                                                          
    init(conf)                                                                                                                                         
  File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/__main__.py", line 91, in init                                                           
    coordinator.add_channel(cls(instance_id=instance_id))                                                                                              
  File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/__init__.py", line 157, in __init__                                                    
    self.authenticate('console_qr_code', first_start=True)                                                                                             
  File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/__init__.py", line 667, in authenticate                                                
    start_immediately=not first_start)                                                                                                                 
  File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/vendor/wxpy/api/bot.py", line 98, in __init__                                          
    enhance_webwx_request(self)                                                                                                                        
  File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/vendor/wxpy/utils/misc.py", line 326, in enhance_webwx_request                         
    '&pass_ticket={li[pass_ticket]}'.format(li=login_info)                                                                                             
KeyError: 'wxsid'

image

运行 efb-wizard 也报错:

[root@snappy-byte-1 default]# efb-wizard
/usr/local/lib/python3.6/site-packages/pydub/utils.py:165: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
  warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
Traceback (most recent call last):
  File "/usr/local/bin/efb-wizard", line 11, in <module>
    load_entry_point('ehforwarderbot==2.0.0', 'console_scripts', 'efb-wizard')()
  File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/wizard.py", line 605, in main
    data.load_config()
  File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/wizard.py", line 108, in load_config
    self.load_modules_list()
  File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/wizard.py", line 134, in load_modules_list
    cls = i.load()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load
    return self.resolve()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.6/site-packages/efb_filter_middleware/__init__.py", line 9, in <module>
    from ehforwarderbot import EFBMiddleware, EFBMsg, utils, MsgType, EFBChat, ChatType, coordinator
ImportError: cannot import name 'EFBMiddleware'

配置:

EH Forwarder Bot
Version: 2.0.0
Python version:
3.6.8 (default, Aug  7 2019, 17:28:10) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Running on profile "default".

Master channel:
    Telegram Master (blueset.telegram) 2.0.3 # Default instance

Slave channel:
    WeChat Slave (blueset.wechat) 2.0.1 # Default instance

Middlewares:
    No middleware is enabled.
mlch911 commented 4 years ago

换了台机器重新装,发现efb-wizard运行错误是配置文件有问题。 但扫码后依旧是一样的错误。

blueset commented 4 years ago

请确认用来登陆的微信号能否正常登陆微信网页版。