Fallen-Breath / MinecraftDataAPI

A MCDReforged api plugin to get player data information and more
GNU General Public License v3.0
17 stars 11 forks source link

在获取玩家信息时报错 `Bad key name (eof)` #9

Closed MisaLiu closed 1 year ago

MisaLiu commented 1 year ago

简要描述

今天在使用 bot 插件的 !!bot spawn 时服务器没有响应,查看控制台发现给出了如下信息:

[Server] [16:48:54] [Server thread/INFO]: <HIMlaoS_Misa> !!bot spawn bot_test
[Server] [16:48:54] [Server thread/INFO]: HIMlaoS_Misa has the following entity data: {seenCredits: 1b, DeathTime: 0s, foodTickTimer: 0, recipeBook: {recipes: ["minecraft:blackstone_stairs_from_blackstone_stonecutting", "minecraft:pisto}
[MCDR] [16:48:54] [commandSpawn/ERROR] [minecraft_data_api]: [Minecraft Data API] Fail to Convert data "HIMlaoS_Misa has the following entity data: {seenCredits: 1b, De...": Bad key name (eof): line 1 column 33937 (char 33936)
[Server] [16:48:54] [Server thread/INFO]: HIMlaoS_Misa has the following entity data: "minecraft:overworld"
Exception in thread commandSpawn:
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mcdreforged\api\decorator\new_thread.py", line 29, in wrapped_target
    raise e from None
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mcdreforged\api\decorator\new_thread.py", line 26, in wrapped_target
    self.__return_value = target(*args_, **kwargs_)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "plugins\Bot-v1.0.6.mcdr\bot\command_handler.py", line 455, in __command_spawn
  File "plugins\Bot-v1.0.6.mcdr\bot\bot_manager.py", line 174, in spawn
  File "plugins\Bot-v1.0.6.mcdr\bot\plugin.py", line 55, in get_location
TypeError: 'NoneType' object is not subscriptable

推测该报错是由 MinecraftDataAPI 造成的。

开启 debug 后的日志输出

MCDR.log,删减了内容

环境信息

吐槽

怎么昨天晚上还能用的今天就不行了

Fallen-Breath commented 1 year ago

MinecraftDataAPI 没有成功解析 XpP: 1.0331472E-7f 这个数据,得看看怎么支持

Fallen-Breath commented 1 year ago

Fixed in v1.5.0