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

使用napcat下载图片提示文件下载失败识别url失败 #19

Open
cmdhb opened this issue Jan 8, 2025 · 8 comments
Open

使用napcat下载图片提示文件下载失败识别url失败 #19

cmdhb opened this issue Jan 8, 2025 · 8 comments

Comments

@cmdhb
Copy link

cmdhb commented Jan 8, 2025

3A118E85A9649435FCB7DF41C649D130
原本napcat是长文件名不能下载,更新了xqa后现在所有的问答都提示这个

@azmiao
Copy link
Owner

azmiao commented Jan 8, 2025

看看设置问题的时候的日志是咋样的

@cmdhb
Copy link
Author

cmdhb commented Jan 8, 2025

看看设置问题的时候的日志是咋样的

[2025-01-08 15:51:21,977 nonebot] INFO: Self: 624359294, Message 1632651244 from 1259165206@[群:675314139]: '有人问2你答[CQ:image,file=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,sub_type=0,file_id=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,url=https://multimedia.nt.qq.com.cn/download?appid=1407&fileid=EhSejTCFoUNeogy5UcZaQXaO4s77hxjZfCD_Cij_mOiE0uWKAzIEcHJvZFCAvaMBWhC-wvTmN2Mo7Q53Ucah4eXJ&rkey=CAISKNPsN0nSR8aLRbStAGKdoN_23D5JV9r72JYDCBmfxFwXbI4RmDNCnYs,file_size=15961,file_unique=2cacc6e7fa985710a59a034889a0dfa8]'
[2025-01-08 15:51:21,977] INFO in message: Self: 624359294, Message 1632651244 from 1259165206@[群:675314139]: '有人问2你答[CQ:image,file=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,sub_type=0,file_id=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,url=https://multimedia.nt.qq.com.cn/download?appid=1407&fileid=EhSejTCFoUNeogy5UcZaQXaO4s77hxjZfCD_Cij_mOiE0uWKAzIEcHJvZFCAvaMBWhC-wvTmN2Mo7Q53Ucah4eXJ&rkey=CAISKNPsN0nSR8aLRbStAGKdoN_23D5JV9r72JYDCBmfxFwXbI4RmDNCnYs,file_size=15961,file_unique=2cacc6e7fa985710a59a034889a0dfa8]'

@azmiao
Copy link
Owner

azmiao commented Jan 8, 2025

看看设置问题的时候的日志是咋样的

[2025-01-08 15:51:21,977 nonebot] INFO: Self: 624359294, Message 1632651244 from 1259165206@[群:675314139]: '有人问2你答[CQ:image,file=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,sub_type=0,file_id=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,url=https://multimedia.nt.qq.com.cn/download?appid=1407&fileid=EhSejTCFoUNeogy5UcZaQXaO4s77hxjZfCD_Cij_mOiE0uWKAzIEcHJvZFCAvaMBWhC-wvTmN2Mo7Q53Ucah4eXJ&rkey=CAISKNPsN0nSR8aLRbStAGKdoN_23D5JV9r72JYDCBmfxFwXbI4RmDNCnYs,file_size=15961,file_unique=2cacc6e7fa985710a59a034889a0dfa8]' [2025-01-08 15:51:21,977] INFO in message: Self: 624359294, Message 1632651244 from 1259165206@[群:675314139]: '有人问2你答[CQ:image,file=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,sub_type=0,file_id=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,url=https://multimedia.nt.qq.com.cn/download?appid=1407&fileid=EhSejTCFoUNeogy5UcZaQXaO4s77hxjZfCD_Cij_mOiE0uWKAzIEcHJvZFCAvaMBWhC-wvTmN2Mo7Q53Ucah4eXJ&rkey=CAISKNPsN0nSR8aLRbStAGKdoN_23D5JV9r72JYDCBmfxFwXbI4RmDNCnYs,file_size=15961,file_unique=2cacc6e7fa985710a59a034889a0dfa8]'

后面的嘞

@cmdhb
Copy link
Author

cmdhb commented Jan 8, 2025

看看设置问题的时候的日志是咋样的

[2025-01-08 15:51:21,977 nonebot] INFO: Self: 624359294, Message 1632651244 from 1259165206@[群:675314139]: '有人问2你答[CQ:image,file=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,sub_type=0,file_id=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,url=https://multimedia.nt.qq.com.cn/download?appid=1407&fileid=EhSejTCFoUNeogy5UcZaQXaO4s77hxjZfCD_Cij_mOiE0uWKAzIEcHJvZFCAvaMBWhC-wvTmN2Mo7Q53Ucah4eXJ&rkey=CAISKNPsN0nSR8aLRbStAGKdoN_23D5JV9r72JYDCBmfxFwXbI4RmDNCnYs,file_size=15961,file_unique=2cacc6e7fa985710a59a034889a0dfa8]' [2025-01-08 15:51:21,977] INFO in message: Self: 624359294, Message 1632651244 from 1259165206@[群:675314139]: '有人问2你答[CQ:image,file=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,sub_type=0,file_id=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,url=https://multimedia.nt.qq.com.cn/download?appid=1407&fileid=EhSejTCFoUNeogy5UcZaQXaO4s77hxjZfCD_Cij_mOiE0uWKAzIEcHJvZFCAvaMBWhC-wvTmN2Mo7Q53Ucah4eXJ&rkey=CAISKNPsN0nSR8aLRbStAGKdoN_23D5JV9r72JYDCBmfxFwXbI4RmDNCnYs,file_size=15961,file_unique=2cacc6e7fa985710a59a034889a0dfa8]'

后面的嘞

就这些嘞

看看设置问题的时候的日志是咋样的

[2025-01-08 15:51:21,977 nonebot] INFO: Self: 624359294, Message 1632651244 from 1259165206@[群:675314139]: '有人问2你答[CQ:image,file=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,sub_type=0,file_id=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,url=https://multimedia.nt.qq.com.cn/download?appid=1407&fileid=EhSejTCFoUNeogy5UcZaQXaO4s77hxjZfCD_Cij_mOiE0uWKAzIEcHJvZFCAvaMBWhC-wvTmN2Mo7Q53Ucah4eXJ&rkey=CAISKNPsN0nSR8aLRbStAGKdoN_23D5JV9r72JYDCBmfxFwXbI4RmDNCnYs,file_size=15961,file_unique=2cacc6e7fa985710a59a034889a0dfa8]' [2025-01-08 15:51:21,977] INFO in message: Self: 624359294, Message 1632651244 from 1259165206@[群:675314139]: '有人问2你答[CQ:image,file=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,sub_type=0,file_id=000001424e61704361744f6e65426f747c4d736746696c657c327c3637353331343133397c373435373434393133313635383134333837337c373435373434393133313635383134333837327c456853656a5443466f554e656f67793555635a615158614f3473373768786a5a6643445f43696a5f6d4f69453075574b417a494563484a765a46434176614d425768432d7776546d4e324d6f37513533556361683465584a.2CACC6E7FA985710A59A034889A0DFA8.jpg,url=https://multimedia.nt.qq.com.cn/download?appid=1407&fileid=EhSejTCFoUNeogy5UcZaQXaO4s77hxjZfCD_Cij_mOiE0uWKAzIEcHJvZFCAvaMBWhC-wvTmN2Mo7Q53Ucah4eXJ&rkey=CAISKNPsN0nSR8aLRbStAGKdoN_23D5JV9r72JYDCBmfxFwXbI4RmDNCnYs,file_size=15961,file_unique=2cacc6e7fa985710a59a034889a0dfa8]'

后面的嘞

然后回答的时候就这样了

[2025-01-08 16:06:35,233 XQA] ERROR: <ActionFailed status='failed', retcode=1200, data=None, message='文件下载失败识别URL失败, uri= 2cacc6e7fa985710a59a034889a0dfa8.image', wording='文件下载失败识别URL失败, uri= 2cacc6e7fa985710a59a034889a0dfa8.image', echo={'seq': 10}>
Traceback (most recent call last):
File "/root/pcrbot/HoshinoBot/hoshino/service.py", line 188, in wrapper
return await func(self.bot, ctx)
File "/root/pcrbot/HoshinoBot/hoshino/modules/XQA/init.py", line 241, in xqa
await bot.send(ev, ans)
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/init.py", line 269, in send
return await self.send_msg(**params)
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/init.py", line 236, in call_action
return await self._api.call_action(action=action, **params)
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/api_impl.py", line 178, in call_action
result = await self._wsr_api.call_action(action, **params)
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/api_impl.py", line 153, in call_action
return _handle_api_result(await
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/api_impl.py", line 38, in _handle_api_result
raise ActionFailed(result=result)
aiocqhttp.exceptions.ActionFailed: <ActionFailed status='failed', retcode=1200, data=None, message='文件下载失败识别URL失败, uri= 2cacc6e7fa985710a59a034889a0dfa8.image', wording='文件下载失败识别URL失败, uri= 2cacc6e7fa985710a59a034889a0dfa8.image', echo={'seq': 10}>
[2025-01-08 16:06:35,233] ERROR in service: <ActionFailed status='failed', retcode=1200, data=None, message='文件下载失败识别URL失败, uri= 2cacc6e7fa985710a59a034889a0dfa8.image', wording='文件下载失败识别URL失败, uri= 2cacc6e7fa985710a59a034889a0dfa8.image', echo={'seq': 10}>
Traceback (most recent call last):
File "/root/pcrbot/HoshinoBot/hoshino/service.py", line 188, in wrapper
return await func(self.bot, ctx)
File "/root/pcrbot/HoshinoBot/hoshino/modules/XQA/init.py", line 241, in xqa
await bot.send(ev, ans)
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/init.py", line 269, in send
return await self.send_msg(**params)
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/init.py", line 236, in call_action
return await self._api.call_action(action=action, **params)
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/api_impl.py", line 178, in call_action
result = await self._wsr_api.call_action(action, **params)
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/api_impl.py", line 153, in call_action
return _handle_api_result(await
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/api_impl.py", line 38, in _handle_api_result
raise ActionFailed(result=result)
aiocqhttp.exceptions.ActionFailed: <ActionFailed status='failed', retcode=1200, data=None, message='文件下载失败识别URL失败, uri= 2cacc6e7fa985710a59a034889a0dfa8.image', wording='文件下载失败识别URL失败, uri= 2cacc6e7fa985710a59a034889a0dfa8.image', echo={'seq': 10}>
[2025-01-08 16:06:35,233 nonebot] INFO: Self: 624359294, Message 1779815622 from 1259165206@[群:675314139]: '2'
[2025-01-08 16:06:35,233] INFO in message: Self: 624359294, Message 1779815622 from 1259165206@[群:675314139]: '2'

@azmiao
Copy link
Owner

azmiao commented Jan 8, 2025

设置问题的时候应该有下载图片的日志吧,下载成功了吗

@azmiao
Copy link
Owner

azmiao commented Jan 8, 2025

设置问题的时候应该有下载图片的日志吧,下载成功了吗
哦哦哦,不好意思,我没注意,400错误
[2025-01-08 16:18:22,821 hoshino] CRITICAL: XQA: 从https://multimedia.nt.qq.com.cn/download?appid=1407&fileid=EhSejTCFoUNeogy5UcZaQXaO4s77hxjZfCD_Ciiz2-iJ2OWKAzIEcHJvZFCAvaMBWhBztch50WT-i8lsRD4XnaF-&rkey=CAISKNPsN0nSR8aLQPzPSOUoIxFO27YxWDjLFhw4LQc9QAdEPFR4gmlYrxE下载图片2cacc6e7fa985710a59a034889a0dfa8.image出错:HTTP Error 400: Bad Request
[2025-01-08 16:18:22,821] CRITICAL in util: XQA: 从https://multimedia.nt.qq.com.cn/download?appid=1407&fileid=EhSejTCFoUNeogy5UcZaQXaO4s77hxjZfCD_Ciiz2-iJ2OWKAzIEcHJvZFCAvaMBWhBztch50WT-i8lsRD4XnaF-&rkey=CAISKNPsN0nSR8aLQPzPSOUoIxFO27YxWDjLFhw4LQc9QAdEPFR4gmlYrxE下载图片2cacc6e7fa985710a59a034889a0dfa8.image出错:HTTP Error 400: Bad Request

看起来似乎上面的CQ码里面的URL打开就是400的,看看napcat那边有没有issue讨论这个图片url的问题吧

@azmiao
Copy link
Owner

azmiao commented Jan 8, 2025

之后napcat那边接口OK了的话可以更新一下xqa试试,我把之前改的提交了,不过可能不稳定,有问题的话就git checkout v1.5.4切回去吧,记得自己提前备份下util.py最上面的配置就行,我这自己目前不用napcat不好测,最近HoshinoBot框架也换成自己的框架了,所以这个版本的测试就是自己做了一个简易的模拟客户端对接测试的,不一定稳😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants