Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QQChat 插件运行中报错:json.decoder.JSONDecodeError #3

Closed
RisingInIris2017 opened this issue Sep 20, 2020 · 3 comments
Closed
Labels
help wanted Extra attention is needed

Comments

@RisingInIris2017
Copy link

RisingInIris2017 commented Sep 20, 2020

服务端环境

MCDR 版本:0.9.6
Minecraft 服务端核心:Fabric
所有安装的 MCDR 插件:

!!MCDR plugin list
[MCDR] [16:37:35] [InfoReactor/INFO]: 8x 已加载插件
[MCDR] [16:37:35] [InfoReactor/INFO]: - CoolQAPI-MCDR.py
[MCDR] [16:37:35] [InfoReactor/INFO]: - daycount.py
[MCDR] [16:37:35] [InfoReactor/INFO]: - Here.py
[MCDR] [16:37:35] [InfoReactor/INFO]: - joinMOTD.py
[MCDR] [16:37:35] [InfoReactor/INFO]: - OnlinePlayerAPI.py
[MCDR] [16:37:35] [InfoReactor/INFO]: - QuickBackupM.py
[MCDR] [16:37:35] [InfoReactor/INFO]: - tps.py
[MCDR] [16:37:35] [InfoReactor/INFO]: - QQChat.py
[MCDR] [16:37:35] [InfoReactor/INFO]: 0x 已禁用插件
[MCDR] [16:37:35] [InfoReactor/INFO]: 0x 未加载插件

问题描述

用 MCDR 启动了上述服务端后,控制台反复跳出如下报错:

[MCDR] [16:31:23] [PT2-on_info@QQChat/ERROR]: Error calling on_info in plugin QQChat
Traceback (most recent call last):
  File "C:\MARYT-Servers\MCDReforged-0.9.6\utils\plugin_thread.py", line 41, in run
    task_data.func(*task_data.args)
  File "plugins\QQChat.py", line 263, in on_info
    forward_list = get_forward()
  File "plugins\QQChat.py", line 306, in get_forward
    return json.load(f)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

因为与 MCDR 及其 QQ 相关插件衔接的 QQ 机器人尚未配置完毕,
所以我并不能确定这个报错是否影响到插件的正常功能使用;
但是报错非常频繁,以至于出现了 log spam 的情况,严重干扰到正常的控制台管理。

想问一下这个情况与哪些可能的原因有关?需要我做哪些操作予以解决?
非常感谢。

@RisingInIris2017 RisingInIris2017 changed the title QQChat 插件运行中报错 QQChat 插件运行中报错:json.decoder.JSONDecodeError Sep 20, 2020
@AnzhiZhang
Copy link
Owner

建议删除plugins文件夹中的QQChat文件夹并且重启MCDR

@AnzhiZhang
Copy link
Owner

可能造成这个错误的原因为无法正常解析qqchat存储数据的json文件

@RisingInIris2017
Copy link
Author

建议删除plugins文件夹中的QQChat文件夹并且重启MCDR

删除后确实解决了这一问题,非常感谢!

@AnzhiZhang AnzhiZhang added the help wanted Extra attention is needed label Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants