iuiaoin / wechat-gptbot

A wechat robot based on ChatGPT with no risk, very stable! 🚀
MIT License
579 stars 113 forks source link

[Bug]: 无法连接到微信 #124

Closed hxiaoCS closed 5 months ago

hxiaoCS commented 5 months ago

Search for answers in existing issues

Python version

python 3.8

Issue description

File "C:\development\wechat-gptbot\venv\Lib\site-packages\requests\adapters.py", line 565, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=5555): Max retries exceeded with url: //api/get_personal_info (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001EB8D0B13D0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')) [INFO][2024-03-04 17:35:26][wechat.py:40] - App startup successfully! [ERROR][2024-03-04 17:35:28][wechat.py:218] - [Websocket] Error: [WinError 10061] No connection could be made because the target machine actively refused it [ERROR][2024-03-04 17:35:28][wechat.py:218] - [Websocket] Error: WeChatChannel.on_close() takes 2 positional arguments but 4 were given

Repro steps

  1. 登陆微信并启动程序
  2. 关闭程序cmd
  3. 登陆另外一个微信
  4. 启动程序

Relevant log output

File "C:\development\wechat-gptbot\venv\Lib\site-packages\requests\adapters.py", line 565, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=5555): Max retries exceeded with url: //api/get_personal_info (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001EB8D0B13D0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
[INFO][2024-03-04 17:35:26][wechat.py:40] - App startup successfully!
[ERROR][2024-03-04 17:35:28][wechat.py:218] - [Websocket] Error: [WinError 10061] No connection could be made because the target machine actively refused it
[ERROR][2024-03-04 17:35:28][wechat.py:218] - [Websocket] Error: WeChatChannel.on_close() takes 2 positional arguments but 4 were given
hxiaoCS commented 5 months ago

需要重新注入