FengLiuFeseliud / pycqBot

go-cqhttp python 框架,可以用于快速塔建 bot
https://fengliufeseliud.github.io/pycqBot/
GNU Affero General Public License v3.0
128 stars 29 forks source link

连接ws成功后,接收消息报错 #27

Closed TsuneZebra closed 1 year ago

TsuneZebra commented 1 year ago

报错内容:

[2023-05-13 10:54:11,903][go-cqhttp/WARNING] PyCqBot: go-cqhttp 警告 Protocol -> device lock is disable. http api may fail. [2023-05-13 10:54:27,358][MainThread/INFO] PyCqBot: 正在连接 go-cqhttp websocket 服务 [2023-05-13 10:54:27,373][run_meta_event_lifecycle_connect_0/INFO] PyCqBot: 成功连接 websocket 服务! bot qq:***** [2023-05-13 10:54:31,821][go-cqhttp/WARNING] PyCqBot: go-cqhttp 警告 警告: 长消息响应延迟为 2932ms, 大于 1000ms, 可能导致无法接收/发送长消息的情况, 请检查本地网络状态. 首次启动,获取历史信息中... ??? [2023-05-13 10:54:34,924][go-cqhttp/WARNING] PyCqBot: go-cqhttp 警告 处理 WebSocket 请求时出现错误: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header [2023-05-13 10:54:34,924][asyncHttp_loop/ERROR] PyCqBot: api 请求发生错误 Error: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8', url=URL('http://127.0.0.1:8080/get_group_msg_history') [2023-05-13 10:54:34,924][asyncHttp_loop/ERROR] PyCqBot: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8', url=URL('http://127.0.0.1:8080/get_group_msg_history') Traceback (most recent call last): File "C:\Users\huawei\AppData\Local\Programs\Python\Python311\Lib\site-packages\pycqBot\asyncHttp.py", line 77, in link http_data = await req.json(encoding=encoding) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\huawei\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\client_reqrep.py", line 1104, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8', url=URL('http://127.0.0.1:8080/get_group_msg_history') [2023-05-13 10:54:34,926][asyncHttp_loop/WARNING] PyCqBot: cqAPI 响应: None / {}

FengLiuFeseliud commented 1 year ago

并非 pycqBot 错误,请至 go-cqhttp