Skip to content

连接bot后报错 #6

@Hychan2333

Description

@Hychan2333
canceled
[MCDR] [14:51:20] [MainThread/INFO]: 服务器进程已停止,返回代码为 0
[MCDR] [14:51:20] [MainThread/INFO]: 服务端已关闭
[MCDR] [14:51:20] [Thread-19 (on_server_stop)/INFO] [hibernate_r]: 事件:服务器关闭
[MCDR] [14:51:20] [TaskExecutor/INFO] [qq_bot]: 检测到服务器关闭,正在通知机器人服务器……
[MCDR] [14:51:20] [Thread-19 (on_server_stop)/INFO] [hibernate_r]: 休眠倒计时取消
[MCDR] [14:51:20] [Thread-20 (start)/INFO] [hibernate_r]: 伪装服务端已启动
[MCDR] [14:51:20] [WebsocketManager/WARNING] [qq_bot]: [Sender] 与机器人的连接已断开!正在尝试重连。
[MCDR] [14:51:20] [WebsocketManager/INFO] [qq_bot]: [Sender] 已连接到机器人服务器!
[MCDR] [14:51:20] [WebsocketManager/INFO] [qq_bot]: [Sender] 收到来自机器人的消息 None
[MCDR] [14:51:20] [TaskExecutor/ERROR]: Error invoking listener EventListener(plugin='qq_bot@2.0.7', callback=<function on_server_stop at 0x000001F5DC702AE0>, priority=1000)
Traceback (most recent call last):
  File "plugins\QQBot-v2.0.7.mcdr\qq_bot\Webscoket\Sender.py", line 47, in send_data
    await self.connection.send(encode(message_data))
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python314\Lib\site-packages\websockets\asyncio\connection.py", line 476, in send
    async with self.send_context():
               ~~~~~~~~~~~~~~~~~^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python314\Lib\contextlib.py", line 214, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python314\Lib\site-packages\websockets\asyncio\connection.py", line 957, in send_context
    raise self.protocol.close_exc from original_exc
websockets.exceptions.ConnectionClosedOK: received 1005 (no status received [internal]); then sent 1005 (no status received [internal])

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python314\Lib\site-packages\mcdreforged\plugin\plugin_manager.py", line 797, in __trigger_listener_sync
    listener.callback(listener.plugin.server_interface, *args)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "plugins\QQBot-v2.0.7.mcdr\qq_bot\Core.py", line 45, in on_server_stop
    manager.run_coroutine(manager.sender.send_shutdown())
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "plugins\QQBot-v2.0.7.mcdr\qq_bot\Webscoket\Manager.py", line 34, in run_coroutine
    return future.result(timeout=20)
           ~~~~~~~~~~~~~^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python314\Lib\concurrent\futures\_base.py", line 450, in result
    return self.__get_result()
           ~~~~~~~~~~~~~~~~~^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python314\Lib\concurrent\futures\_base.py", line 395, in __get_result
    raise self._exception
  File "plugins\QQBot-v2.0.7.mcdr\qq_bot\Webscoket\Sender.py", line 83, in send_shutdown
    if await self.send_data('server_shutdown'):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "plugins\QQBot-v2.0.7.mcdr\qq_bot\Webscoket\Sender.py", line 65, in send_data
    return await self.send_data(event_type, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "plugins\QQBot-v2.0.7.mcdr\qq_bot\Webscoket\Sender.py", line 54, in send_data
    if response.get('success'):
       ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
canceled
[MCDR] [14:51:23] [WebsocketManager/INFO] [qq_bot]: [Listener] 正在尝试重新连接……
[MCDR] [14:51:23] [WebsocketManager/INFO] [qq_bot]: [Listener] 已连接到机器人服务器!
[MCDR] [14:51:23] [WebsocketManager/ERROR] [qq_bot]: [Listener] 与机器人的连接出现错误:'NoneType' object has no attribute 'get' 。
[MCDR] [14:51:28] [WebsocketManager/INFO] [qq_bot]: [Listener] 正在尝试重新连接……
[MCDR] [14:51:28] [WebsocketManager/INFO] [qq_bot]: [Listener] 已连接到机器人服务器!
[MCDR] [14:51:28] [WebsocketManager/ERROR] [qq_bot]: [Listener] 与机器人的连接出现错误:'NoneType' object has no attribute 'get' 。
[MCDR] [14:51:33] [WebsocketManager/INFO] [qq_bot]: [Listener] 正在尝试重新连接……
[MCDR] [14:51:33] [WebsocketManager/INFO] [qq_bot]: [Listener] 已连接到机器人服务器!
[MCDR] [14:51:33] [WebsocketManager/ERROR] [qq_bot]: [Listener] 与机器人的连接出现错误:'NoneType' object has no attribute 'get' 。
[MCDR] [14:51:38] [WebsocketManager/INFO] [qq_bot]: [Listener] 正在尝试重新连接……
[MCDR] [14:51:38] [WebsocketManager/INFO] [qq_bot]: [Listener] 已连接到机器人服务器!
[MCDR] [14:51:38] [WebsocketManager/ERROR] [qq_bot]: [Listener] 与机器人的连接出现错误:'NoneType' object has no attribute 'get' 。
[MCDR] [14:51:43] [WebsocketManager/INFO] [qq_bot]: [Listener] 正在尝试重新连接……
[MCDR] [14:51:43] [WebsocketManager/INFO] [qq_bot]: [Listener] 已连接到机器人服务器!
[MCDR] [14:51:43] [WebsocketManager/ERROR] [qq_bot]: [Listener] 与机器人的连接出现错误:'NoneType' object has no attribute 'get' 。
[MCDR] [14:51:48] [WebsocketManager/INFO] [qq_bot]: [Listener] 正在尝试重新连接……
[MCDR] [14:51:48] [WebsocketManager/INFO] [qq_bot]: [Listener] 已连接到机器人服务器!
[MCDR] [14:51:48] [WebsocketManager/ERROR] [qq_bot]: [Listener] 与机器人的连接出现错误:'NoneType' object has no attribute 'get' 。

启动MCDR及关闭服务器都会出现
[MCDR] [14:51:20] [TaskExecutor/ERROR]: Error invoking listener EventListener(plugin='qq_bot@2.0.7', callback=<function on_server_stop at 0x000001F5DC702AE0>, priority=1000)的报错,服务器开启期间反复重连bot

使用的bot协议端为llonebotV6.6.5,配置正向ws端口为8000,无端口冲突,配置token都对得上
llob日志为




2025-12-25 15:00:09 | ws connect /websocket/minecraft



2025-12-25 15:00:14 | ws connect /websocket/minecraft



2025-12-25 15:00:19 | ws connect /websocket/minecraft

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions