Syan-Lin/CyberWaifu

127.0.0.1:5700拒绝访问

Closed this issue · 2 comments

Microsoft Windows [版本 10.0.20348.169]
(c) Microsoft Corporation。保留所有权利。

D:\cyberwaifu\CyberWaifu>conda activate CyberWaifu

(CyberWaifu) D:\cyberwaifu\CyberWaifu>python main.py
�[32m
###############################################################################
██████╗██╗ ██╗██████╗ ███████╗██████╗ ██╗ ██╗ █████╗ ██╗███████╗██╗ ██╗
██╔════╝╚██╗ ██╔╝██╔══██╗██╔════╝██╔══██╗██║ ██║██╔══██╗██║██╔════╝██║ ██║
██║ ╚████╔╝ ██████╔╝█████╗ ██████╔╝██║ █╗ ██║███████║██║█████╗ ██║ ██║
██║ ╚██╔╝ ██╔══██╗██╔══╝ ██╔══██╗██║███╗██║██╔══██║██║██╔══╝ ██║ ██║
╚██████╗ ██║ ██████╔╝███████╗██║ ██║╚███╔███╔╝██║ ██║██║██║ ╚██████╔╝
╚═════╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═════╝
v1.0 BY Yuan.
###############################################################################
�[0m
人设文件加载成功!(./presets/charactor/香草.txt)
表情包加载成功!(6 个表情包文件)
记忆数据库存在,不导入记忆

#################################################################
██████╗ ██╗ ██╗ ██████╗ ██████╗ ██████╗ ██████╗ ████████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██╔═══██╗██╔══██╗██╔═══██╗╚══██╔══╝
██████╔╝ ╚████╔╝ ██║ ██║ ██║██████╔╝██║ ██║ ██║
██╔═══╝ ╚██╔╝ ██║ ██║▄▄ ██║██╔══██╗██║ ██║ ██║
██║ ██║ ╚██████╗╚██████╔╝██████╔╝╚██████╔╝ ██║
╚═╝ ╚═╝ ╚═════╝ ╚══▀▀═╝ ╚═════╝ ╚═════╝ ╚═╝
v0.5.1.1 BY FengLiu
#################################################################

[2023-05-21 15:00:43,474][go-cqhttp/WARNING] PyCqBot: go-cqhttp 警告 Protocol -> device lock is disable. http api may fail.
[2023-05-21 15:00:45,378][MainThread/INFO] PyCqBot: 正在连接 go-cqhttp websocket 服务
[2023-05-21 15:00:45,456][run_meta_event_lifecycle_connect_0/INFO] PyCqBot: 成功连接 websocket 服务! bot qq:647212779
[2023-05-21 15:00:45,912][go-cqhttp/WARNING] PyCqBot: go-cqhttp 警告 检查更新失败!
[2023-05-21 15:01:12,759][run_on_private_msg_0/INFO] PyCqBot: 开始!接收到信息: 在吗
Batches: 100%|███████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 5.75it/s]
[2023-05-21 15:01:12,996][run_on_private_msg_0/INFO] PyCqBot: 查询到相关记忆:
如果被问到喜欢吃什么,香草会说:“喜欢吃巧克力,巧克力是yyds喵!”[相关性: 0.39839242732352476]

[2023-05-21 15:01:21,722][run_on_private_msg_0/INFO] PyCqBot: 结束回复
[2023-05-21 15:01:22,229][run_on_private_msg_0/INFO] PyCqBot: 发送信息: 在在~
[2023-05-21 15:01:22,736][run_on_private_msg_0/INFO] PyCqBot: 发送信息: 主人找香草有事吗?
[2023-05-21 15:01:24,246][asyncHttp_loop/ERROR] PyCqBot: api 请求发生错误 Error: Cannot connect to host 127.0.0.1:5700 ssl:default [远程计算机拒绝网络连接。]
[2023-05-21 15:01:24,246][asyncHttp_loop/ERROR] PyCqBot: Cannot connect to host 127.0.0.1:5700 ssl:default [远程计算机拒绝网络连接。]
Traceback (most recent call last):
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 980, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\base_events.py", line 1076, in create_connection
raise exceptions[0]
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\base_events.py", line 1060, in create_connection
sock = await self._connect_sock(
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\base_events.py", line 969, in _connect_sock
await self.sock_connect(sock, address)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\proactor_events.py", line 709, in sock_connect
return await self._proactor.connect(sock, address)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\windows_events.py", line 826, in _poll
value = callback(transferred, key, ov)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\windows_events.py", line 613, in finish_connect
ov.getresult()
ConnectionRefusedError: [WinError 1225] 远程计算机拒绝网络连接。

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\pycqBot\asyncHttp.py", line 75, in link
async with self._session.post(url, data=data, allow_redirects=allow_redirects, proxy=proxy, headers=headers) as req:
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\client.py", line 1141, in aenter
self._resp = await self._coro
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\client.py", line 536, in _request
conn = await self._connector.connect(
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 1206, in _create_direct_connection
raise last_exc
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 988, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:5700 ssl:default [远程计算机拒绝网络连 接。]
[2023-05-21 15:01:24,263][asyncHttp_loop/WARNING] PyCqBot: cqAPI 响应: None / {}
[2023-05-21 15:01:24,754][asyncHttp_loop/ERROR] PyCqBot: api 请求发生错误 Error: Cannot connect to host 127.0.0.1:5700 ssl:default [远程计算机拒绝网络连接。]
[2023-05-21 15:01:24,754][asyncHttp_loop/ERROR] PyCqBot: Cannot connect to host 127.0.0.1:5700 ssl:default [远程计算机拒绝网络连接。]
Traceback (most recent call last):
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 980, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\base_events.py", line 1076, in create_connection
raise exceptions[0]
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\base_events.py", line 1060, in create_connection
sock = await self._connect_sock(
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\base_events.py", line 969, in _connect_sock
await self.sock_connect(sock, address)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\proactor_events.py", line 709, in sock_connect
return await self._proactor.connect(sock, address)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\windows_events.py", line 826, in _poll
value = callback(transferred, key, ov)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\windows_events.py", line 613, in finish_connect
ov.getresult()
ConnectionRefusedError: [WinError 1225] 远程计算机拒绝网络连接。

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\pycqBot\asyncHttp.py", line 75, in link
async with self._session.post(url, data=data, allow_redirects=allow_redirects, proxy=proxy, headers=headers) as req:
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\client.py", line 1141, in aenter
self._resp = await self._coro
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\client.py", line 536, in _request
conn = await self._connector.connect(
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 1206, in _create_direct_connection
raise last_exc
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 988, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:5700 ssl:default [远程计算机拒绝网络连 接。]
[2023-05-21 15:01:24,755][asyncHttp_loop/WARNING] PyCqBot: cqAPI 响应: None / {}
[2023-05-21 15:01:29,553][run_on_private_msg_0/INFO] PyCqBot: 发送表情包: 3.png
[2023-05-21 15:01:31,602][asyncHttp_loop/ERROR] PyCqBot: api 请求发生错误 Error: Cannot connect to host 127.0.0.1:5700 ssl:default [远程计算机拒绝网络连接。]
[2023-05-21 15:01:31,602][asyncHttp_loop/ERROR] PyCqBot: Cannot connect to host 127.0.0.1:5700 ssl:default [远程计算机拒绝网络连接。]
Traceback (most recent call last):
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 980, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\base_events.py", line 1076, in create_connection
raise exceptions[0]
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\base_events.py", line 1060, in create_connection
sock = await self._connect_sock(
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\base_events.py", line 969, in _connect_sock
await self.sock_connect(sock, address)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\proactor_events.py", line 709, in sock_connect
return await self._proactor.connect(sock, address)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\windows_events.py", line 826, in _poll
value = callback(transferred, key, ov)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\asyncio\windows_events.py", line 613, in finish_connect
ov.getresult()
ConnectionRefusedError: [WinError 1225] 远程计算机拒绝网络连接。

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\pycqBot\asyncHttp.py", line 75, in link
async with self._session.post(url, data=data, allow_redirects=allow_redirects, proxy=proxy, headers=headers) as req:
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\client.py", line 1141, in aenter
self._resp = await self._coro
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\client.py", line 536, in _request
conn = await self._connector.connect(
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 1206, in _create_direct_connection
raise last_exc
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "C:\ProgramData\miniconda3\envs\CyberWaifu\lib\site-packages\aiohttp\connector.py", line 988, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:5700 ssl:default [远程计算机拒绝网络连 接。]
[2023-05-21 15:01:31,602][asyncHttp_loop/WARNING] PyCqBot: cqAPI 响应: None / {}

服务器已经关闭防火墙,具体错误体现为bot能够接受并处理我发送的qq消息,但是不会返回给我消息

经检查,是我使用脚本启动gocqhttp后生成的配置文件不能被识别,删除后让main.py生成配置,问题自行解决

我也遇到了一样的错误