azmiao / XQA

一个支持正则,支持回流,支持随机回答,支持图片等CQ码的你问我答
GNU General Public License v3.0
30 stars 5 forks source link

回答不了图片 #17

Closed Accelerator23333 closed 1 month ago

Accelerator23333 commented 1 month ago

回答图片时失败,回答文字正常使用 [2024-09-24 18:01:09,720 hoshino] CRITICAL: XQA: 调用get_image接口查询图片5b919f49ed1f226a59e4f1de77dcad17279090-999-1377.png出错:<ActionFailed status='failed', retcode=-1, msg='Value of "this" must be of type URLSearchParams', wording='ws-plugin获取信息失败', echo={'seq': 2}> [2024-09-24 18:01:09,720] CRITICAL in util: XQA: 调用get_image接口查询图片5b919f49ed1f226a59e4f1de77dcad17279090-999-1377.png出错:<ActionFailed status='failed', retcode=-1, msg='Value of "this" must be of type URLSearchParams', wording='ws-plugin获取信息失败', echo={'seq': 2}> [2024-09-24 18:01:09,721 XQA] ERROR: <class 'TypeError'> occured when set_question handling message -1820556216. [2024-09-24 18:01:09,721] ERROR in service: <class 'TypeError'> occured when set_question handling message -1820556216. [2024-09-24 18:01:09,722 XQA] ERROR: 'NoneType' object is not subscriptable Traceback (most recent call last): File "C:\Users\Administrator\Desktop\HoshinoBot\HoshinoBot\hoshino\service.py", line 192, in wrapper return await func(self.bot, ctx) File "C:\Users\Administrator\Desktop\HoshinoBot\HoshinoBot\hoshino\modules\XQA__init__.py", line 115, in set_question msg = await set_que(bot, group_id, user_id, que_raw, ans_raw, str(ev.group_id)) File "C:\Users\Administrator\Desktop\HoshinoBot\HoshinoBot\hoshino\modules\XQA\operate_msg.py", line 20, in set_que ans_raw = await adjust_img(bot, ans_raw, save=True) File "C:\Users\Administrator\Desktop\HoshinoBot\HoshinoBot\hoshino\modules\XQA\util.py", line 162, in adjust_img raw_body = await doing_img(bot, raw_body, is_ans, save) File "C:\Users\Administrator\Desktop\HoshinoBot\HoshinoBot\hoshino\modules\XQA\util.py", line 139, in doing_img url = img_data['url'] TypeError: 'NoneType' object is not subscriptable [2024-09-24 18:01:09,722] ERROR in service: 'NoneType' object is not subscriptable Traceback (most recent call last): File "C:\Users\Administrator\Desktop\HoshinoBot\HoshinoBot\hoshino\service.py", line 192, in wrapper return await func(self.bot, ctx) File "C:\Users\Administrator\Desktop\HoshinoBot\HoshinoBot\hoshino\modules\XQA__init__.py", line 115, in set_question msg = await set_que(bot, group_id, user_id, que_raw, ans_raw, str(ev.group_id)) File "C:\Users\Administrator\Desktop\HoshinoBot\HoshinoBot\hoshino\modules\XQA\operate_msg.py", line 20, in set_que ans_raw = await adjust_img(bot, ans_raw, save=True) File "C:\Users\Administrator\Desktop\HoshinoBot\HoshinoBot\hoshino\modules\XQA\util.py", line 162, in adjust_img raw_body = await doing_img(bot, raw_body, is_ans, save) File "C:\Users\Administrator\Desktop\HoshinoBot\HoshinoBot\hoshino\modules\XQA\util.py", line 139, in doing_img url = img_data['url'] TypeError: 'NoneType' object is not subscriptable

azmiao commented 1 month ago

请提供BOT实现客户端和对应版本,这边推荐使用gocqhttp1.2.0

Accelerator23333 commented 1 month ago

用ws插件连接的云崽机器人 https://gitee.com/xiaoye12123/ws-plugin

azmiao commented 1 month ago

用ws插件连接的云崽机器人 https://gitee.com/xiaoye12123/ws-plugin

请看该项目文档下方实现API,未适配get_image接口,因此无法实现本功能,建议等待其实现后再尝试哦