iuiaoin / wechat-gptbot

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

[Bug]: Get personal info failed! [WinError 10061]Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。') #101

Closed liangchaoUpUp closed 9 months ago

liangchaoUpUp commented 9 months ago

Search for answers in existing issues

Python version

python 3.10

Issue description

起初运行都很正常,直到我切换微信之后,便无法启动。我尝试过关机以及卸载微信重新安装,重新注入。都链接失败,我检查过防火墙也并未开启,我是在pycharm中运行,报错地方是在post请求这里,请问是我哪里操作有问题吗 response = requests.post(url, json={"para": base_data}, timeout=5)

Repro steps

No response

Relevant log output

[INFO][2023-11-20 14:44:34][manager.py:42] - Checking plugins...
[INFO][2023-11-20 14:44:34][manager.py:54] - All plugins are installed
[ERROR][2023-11-20 14:44:36][api.py:46] - Get personal info failed!
[ERROR][2023-11-20 14:44:36][api.py:47] - 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 0x000002062ED1BC10>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
Traceback (most recent call last):
  File "D:\MySoft\Respond\wechat-gptbot_two\lib\site-packages\urllib3\connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "D:\MySoft\Respond\wechat-gptbot_two\lib\site-packages\urllib3\util\connection.py", line 95, in create_connection
    raise err
  File "D:\MySoft\Respond\wechat-gptbot_two\lib\site-packages\urllib3\util\connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

During handling of the above exception, another exception occurred:
QAbot-zh commented 9 months ago

timeout时间给长一点试试

liangchaoUpUp commented 9 months ago

谢谢,已经解决了。我试着反复重新注入后,再次运行py能识别到了