Closed 3205675095 closed 1 year ago
再开几次就这样了 按什么键都直接闪退
H:\下载\新建文件夹\QQbot\bot>cd QChatGPT
H:\下载\新建文件夹\QQbot\bot\QChatGPT>..\python\python.exe main.py
Database initialized.
[2023-02-11 21:54:56.497] keymgr.py (56) - [INFO] : 使用api-key:default
[2023-02-11 21:54:56.529] manager.py (74) - [INFO] : 加载禁用列表: person: [2854196310], group: [204785790]
2023-02-11 21:54:56 - WARNING 未找到可用的 ASGI 服务,反向 WebSocket 和 WebHook 上报将不可用。
仅 HTTP 轮询与正向 WebSocket 可用。
建议安装 ASGI 服务器,如 uvicorn
或 hypercorn
。
在命令行键入:
pip install uvicorn
或者
pip install hypercorn
[2023-02-11 21:54:56.532] bot.py (260) - [WARNING] : 未找到可用的 ASGI 服务,反向 WebSocket 和 WebHook 上报将不可用。
仅 HTTP 轮询与正向 WebSocket 可用。
建议安装 ASGI 服务器,如 uvicorn
或 hypercorn
。
在命令行键入:
pip install uvicorn
或者
pip install hypercorn
2023-02-11 21:55:00 - ERROR 无法连接到 mirai。请检查 mirai-api-http 是否启动,地址与端口是否正确。
[2023-02-11 21:55:00.543] base.py (40) - [ERROR] : 无法连接到 mirai。请检查 mirai-api-http 是否启动,地址与端口是否正确 。
[2023-02-11 21:55:00.547] main.py (143) - [ERROR] : 连接mirai-api-http失败:无法连接到 mirai。请检查 mirai-api-http 是否 启动,地址与端口是否正确。, 请检查是否已按照文档启动mirai
H:\下载\新建文件夹\QQbot\bot\QChatGPT>pause 请按任意键继续. . .
请按照文档正确配置mirai并启动mirai
全部按照视频做了 是还有什么东西没下吗 大佬感谢了 本人小白
启动了mirai了吗
启动了
那么就检查mirai/config/net.../settings.yml
写的端口和QChatGPT/config.py
中mirai_http_api_config
的端口是否一致,同时检查防火墙是否拦截此端口
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[2023-02-15 02:27:26.705] manager.py (28) - [INFO] : 文字总使用量:0
[2023-02-15 02:27:26.705] manager.py (77) - [INFO] : 加载禁用列表: person: [2854196310], group: [204785790]
[2023-02-15 02:27:26.706] host.py (60) - [INFO] : 加载插件
[2023-02-15 02:27:26.707] host.py (72) - [INFO] : 初始化插件
2023-02-15 02:27:26 - WARNING 未找到可用的 ASGI 服务,反向 WebSocket 和 WebHook 上报将不可用。
仅 HTTP 轮询与正向 WebSocket 可用。
建议安装 ASGI 服务器,如 uvicorn
或 hypercorn
。
在命令行键入:
pip install uvicorn
或者
pip install hypercorn
WARNING: 未找到可用的 ASGI 服务,反向 WebSocket 和 WebHook 上报将不可用。
仅 HTTP 轮询与正向 WebSocket 可用。
建议安装 ASGI 服务器,如 uvicorn
或 hypercorn
。
在命令行键入:
pip install uvicorn
或者
pip install hypercorn
[2023-02-15 02:27:26.708] bot.py (262) - [WARNING] : 未找到可用的 ASGI 服务,反向 WebSocket 和 WebHook 上报将不可用。
仅 HTTP 轮询与正向 WebSocket 可用。
建议安装 ASGI 服务器,如 uvicorn
或 hypercorn
。
在命令行键入:
pip install uvicorn
或者
pip install hypercorn
[2023-02-15 02:27:38.716] main.py (194) - [INFO] : 程序启动完成,如长时间未显示 ”成功登录到账号xxxxx“ ,并且不回复消息,请查看 https://github.com/RockChinQ/QChatGPT/issues/37
[2023-02-15 02:27:44.110] manager.py (295) - [INFO] : 通知管理员:新版本可用,请发送 !update 进行自动更新
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 917, in run
self._target(*self._args, self._kwargs)
File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 430, in call
return await self.set(*args, *kwargs)
File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 398, in set
return await self._call_api(
File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 386, in _call_api
return await api.call(self.api_provider, method, response_type)
File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 318, in call
raw_response = await self._call(api_provider, method)
File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 304, in _call
return await api_provider.call_api(
File "/usr/local/lib/python3.9/site-packages/mirai/bot.py", line 320, in call_api
return await self._adapter.call_api(api, args, kwargs)
File "/usr/local/lib/python3.9/site-packages/mirai/adapters/websocket.py", line 232, in call_api
await self.connection.send(json_dumps(content))
File "/usr/local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 635, in send
await self.ensure_open()
File "/usr/local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 944, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedOK: received 1000 (OK) 指定Bot不存在; then sent 1000 (OK) 指定Bot不存在
那么就检查
mirai/config/net.../settings.yml
写的端口和QChatGPT/config.py
中mirai_http_api_config
的端口是否一致,同时检查防火墙是否拦截此端口
我也遇到了这个问题,我是在linux中使用docker部署的,配置我看了都是一致的
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv [2023-02-15 02:27:26.705] manager.py (28) - [INFO] : 文字总使用量:0 [2023-02-15 02:27:26.705] manager.py (77) - [INFO] : 加载禁用列表: person: [2854196310], group: [204785790] [2023-02-15 02:27:26.706] host.py (60) - [INFO] : 加载插件 [2023-02-15 02:27:26.707] host.py (72) - [INFO] : 初始化插件 2023-02-15 02:27:26 - WARNING 未找到可用的 ASGI 服务,反向 WebSocket 和 WebHook 上报将不可用。 仅 HTTP 轮询与正向 WebSocket 可用。 建议安装 ASGI 服务器,如
uvicorn
或hypercorn
。 在命令行键入: pip install uvicorn 或者 pip install hypercorn WARNING: 未找到可用的 ASGI 服务,反向 WebSocket 和 WebHook 上报将不可用。 仅 HTTP 轮询与正向 WebSocket 可用。 建议安装 ASGI 服务器,如uvicorn
或hypercorn
。 在命令行键入: pip install uvicorn 或者 pip install hypercorn [2023-02-15 02:27:26.708] bot.py (262) - [WARNING] : 未找到可用的 ASGI 服务,反向 WebSocket 和 WebHook 上报将不可用。 仅 HTTP 轮询与正向 WebSocket 可用。 建议安装 ASGI 服务器,如uvicorn
或hypercorn
。 在命令行键入: pip install uvicorn 或者 pip install hypercorn [2023-02-15 02:27:38.716] main.py (194) - [INFO] : 程序启动完成,如长时间未显示 ”成功登录到账号xxxxx“ ,并且不回复消息,请查看 #37 [2023-02-15 02:27:44.110] manager.py (295) - [INFO] : 通知管理员:新版本可用,请发送 !update 进行自动更新 Exception in thread Thread-3: Traceback (most recent call last): File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner self.run() File "/usr/local/lib/python3.9/threading.py", line 917, in run self._target(*self._args, self._kwargs) File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete return future.result() File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 430, in call return await self.set(*args, *kwargs) File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 398, in set return await self._call_api( File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 386, in _call_api return await api.call(self.api_provider, method, response_type) File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 318, in call raw_response = await self._call(api_provider, method) File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 304, in _call return await api_provider.call_api( File "/usr/local/lib/python3.9/site-packages/mirai/bot.py", line 320, in call_api return await self._adapter.call_api(api, args, kwargs) File "/usr/local/lib/python3.9/site-packages/mirai/adapters/websocket.py", line 232, in call_api await self.connection.send(json_dumps(content)) File "/usr/local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 635, in send await self.ensure_open() File "/usr/local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 944, in ensure_open raise self.connection_closed_exc() websockets.exceptions.ConnectionClosedOK: received 1000 (OK) 指定Bot不存在; then sent 1000 (OK) 指定Bot不存在那么就检查
mirai/config/net.../settings.yml
写的端口和QChatGPT/config.py
中mirai_http_api_config
的端口是否一致,同时检查防火墙是否拦截此端口我也遇到了这个问题,我是在linux中使用docker部署的,配置我看了都是一致的
确保机器人已经把管理员账户加为好友
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv [2023-02-15 02:27:26.705] manager.py (28) - [INFO] : 文字总使用量:0 [2023-02-15 02:27:26.705] manager.py (77) - [INFO] : 加载禁用列表: person: [2854196310], group: [204785790] [2023-02-15 02:27:26.706] host.py (60) - [INFO] : 加载插件 [2023-02-15 02:27:26.707] host.py (72) - [INFO] : 初始化插件 2023-02-15 02:27:26 - WARNING 未找到可用的 ASGI 服务,反向 WebSocket 和 WebHook 上报将不可用。 仅 HTTP 轮询与正向 WebSocket 可用。 建议安装 ASGI 服务器,如
uvicorn
或hypercorn
。 在命令行键入: pip install uvicorn 或者 pip install hypercorn WARNING: 未找到可用的 ASGI 服务,反向 WebSocket 和 WebHook 上报将不可用。 仅 HTTP 轮询与正向 WebSocket 可用。 建议安装 ASGI 服务器,如uvicorn
或hypercorn
。 在命令行键入: pip install uvicorn 或者 pip install hypercorn [2023-02-15 02:27:26.708] bot.py (262) - [WARNING] : 未找到可用的 ASGI 服务,反向 WebSocket 和 WebHook 上报将不可用。 仅 HTTP 轮询与正向 WebSocket 可用。 建议安装 ASGI 服务器,如uvicorn
或hypercorn
。 在命令行键入: pip install uvicorn 或者 pip install hypercorn [2023-02-15 02:27:38.716] main.py (194) - [INFO] : 程序启动完成,如长时间未显示 ”成功登录到账号xxxxx“ ,并且不回复消息,请查看 #37 [2023-02-15 02:27:44.110] manager.py (295) - [INFO] : 通知管理员:新版本可用,请发送 !update 进行自动更新 Exception in thread Thread-3: Traceback (most recent call last): File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner self.run() File "/usr/local/lib/python3.9/threading.py", line 917, in run self._target(*self._args, self._kwargs) File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete return future.result() File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 430, in call return await self.set(*args, *kwargs) File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 398, in set return await self._call_api( File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 386, in _call_api return await api.call(self.api_provider, method, response_type) File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 318, in call raw_response = await self._call(api_provider, method) File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 304, in _call return await api_provider.call_api( File "/usr/local/lib/python3.9/site-packages/mirai/bot.py", line 320, in call_api return await self._adapter.call_api(api, args, kwargs) File "/usr/local/lib/python3.9/site-packages/mirai/adapters/websocket.py", line 232, in call_api await self.connection.send(json_dumps(content)) File "/usr/local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 635, in send await self.ensure_open() File "/usr/local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 944, in ensure_open raise self.connection_closed_exc() websockets.exceptions.ConnectionClosedOK: received 1000 (OK) 指定Bot不存在; then sent 1000 (OK) 指定Bot不存在那么就检查
mirai/config/net.../settings.yml
写的端口和QChatGPT/config.py
中mirai_http_api_config
的端口是否一致,同时检查防火墙是否拦截此端口我也遇到了这个问题,我是在linux中使用docker部署的,配置我看了都是一致的
确保机器人已经把管理员账户加为好友
谢谢大佬,我发现我忘了登录mirai了
我已经登录了,这怎么回事
怎么办怎么办