RockChinQ / QChatGPT

😎高稳定性、🧩支持扩展、🦄多模态的 ChatGPT QQ / QQ频道 / One Bot 机器人🤖 | 支持 OpenAI GPT、Claude、Gemini Pro、DeepSeek、Moonshot(Kimi)、gpt4free、One API、Ollama 的 QQ / QQ频道 / OneBot 机器人 / Agent 平台
https://q.rkcn.top
GNU Affero General Public License v3.0
4.32k stars 332 forks source link

[BUG]更新2.1.4后主程序出错? #244

Closed YeAiqingEvergreen closed 1 year ago

YeAiqingEvergreen commented 1 year ago

运行环境

描述漏洞
在更新2.1.4后,出现以下问题

完整报错信息
C:\Program Files (x86)\QQbot\bot>cd QChatGPT C:\Program Files (x86)\QQbot\bot\QChatGPT>..\python\python.exe main.py Database initialized. [2023-03-07 12:19:18.412] keymgr.py (62) - [INFO] : 使用api-key:default [2023-03-07 12:19:18.413] manager.py (30) - [INFO] : 文字总使用量:6054 [2023-03-07 12:19:18.414] manager.py (95) - [INFO] : 加载禁用列表: person: [2854196310], group: [204785790] [2023-03-07 12:19:30.416] main.py (261) - [INFO] : 程序启动完成,如长时间未显示 ”成功登录到账号xxxxx“ ,并且不回复消息, 请查看 https://github.com/RockChinQ/QChatGPT/issues/37 Traceback (most recent call last): File "C:\Program Files (x86)\QQbot\bot\QChatGPT\main.py", line 360, in qqbot = main(True) File "C:\Program Files (x86)\QQbot\bot\QChatGPT\main.py", line 198, in main qqbot = pkg.qqbot.manager.QQBotManager(mirai_http_api_config=config.mirai_http_api_config, File "C:\Program Files (x86)\QQbot\bot\QChatGPT.\pkg\qqbot\manager.py", line 102, in init sensitive_json = json.load(f) File "json__init.py", line 293, in load File "json\init__.py", line 335, in loads json.decoder.JSONDecodeError: Unexpected UTF-8 BOM (decode using utf-8-sig): line 1 column 1 (char 0) C:\Program Files (x86)\QQbot\bot\QChatGPT>pause 请按任意键继续. . .

RockChinQ commented 1 year ago

你是否修改了sensitive.json ?

YeAiqingEvergreen commented 1 year ago

是的,按照更新后的sensitive-template.json修改了sensitive.json

RockChinQ commented 1 year ago

是的,按照更新后的sensitive-template.json修改了sensitive.json

提供内容

YeAiqingEvergreen commented 1 year ago

是的,按照更新后的sensitive-template.json修改了sensitive.json

提供内容

{
"说明": "mask将替换敏感词中的每一个字,若mask_word值不为空,则将敏感词整个替换为mask_word的值",
"mask": "*",
"mask_word": "",
"words": [
]
}
RockChinQ commented 1 year ago

是的,按照更新后的sensitive-template.json修改了sensitive.json

提供内容

{
  "说明": "mask将替换敏感词中的每一个字,若mask_word值不为空,则将敏感词整个替换为mask_word的值",
  "mask": "*",
  "mask_word": "",
  "words": [
  ]
}

不清楚,你直接把sensitive.json整个版上来吧

YeAiqingEvergreen commented 1 year ago

是的,按照更新后的sensitive-template.json修改了sensitive.json

提供内容

{
  "说明": "mask将替换敏感词中的每一个字,若mask_word值不为空,则将敏感词整个替换为mask_word的值",
  "mask": "*",
  "mask_word": "",
  "words": [
  ]
}

不清楚,你直接把sensitive.json整个版上来吧

sensitive.txt

RockChinQ commented 1 year ago

我这边没有遇到这个问题,建议你删除sensitive.json后重启以重新生成

YeAiqingEvergreen commented 1 year ago

我这边没有遇到这个问题,建议你删除sensitive.json后重启以重新生成

已解决,猜测是修改了mask_word导致的问题