Closed huanxin996 closed 2 weeks ago
WebSocket call api download_file timeout
请检查网络或ws连接
另外用的是什么qqbot框架?
使用的是llonebot v4.1.2
在服务器上部署同样无法下载
llonebot那边有日志报错吗
onebot Error: Opening handshake has timed out
at ClientRequest.
检查log发现重复出现这个,然后控制台报错超时
或许你可以尝试下napcat 看看是否会报错
好的 切换成napcat后未出现问题 谢谢
10-29 22:07:18 [ERROR] Hx.bot | Running Matcher(type='message', module=nonebot-plugin-ncm, lineno=103) failed. Traceback (most recent call last):
File "", line 1, in
File "C:\Users\mcxia\AppData\Local\Programs\Python\Python310-32\lib\multiprocessing\spawn.py", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) │ │ └ 444 │ └ 3 └ <function _main at 0x01AF11D8>
File "C:\Users\mcxia\AppData\Local\Programs\Python\Python310-32\lib\multiprocessing\spawn.py", line 129, in _main return self._bootstrap(parent_sentinel) │ │ └ 444 │ └ <function BaseProcess._bootstrap at 0x01A5C538> └
File "C:\Users\mcxia\AppData\Local\Programs\Python\Python310-32\lib\multiprocessing\process.py", line 314, in _bootstrap self.run() │ └ <function BaseProcess.run at 0x01A5C070> └
File "C:\Users\mcxia\AppData\Local\Programs\Python\Python310-32\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) │ │ │ │ │ └ {} │ │ │ │ └
│ │ │ └ (<multiprocessing.synchronize.Event object at 0x01AFDF28>,)
│ │ └
│ └ <function _run at 0x0E032808>
└
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\nonebot_plugin_reboot\reloader.py", line 27, in _run _nb_run(*args, **kwargs) │ │ └ {} │ └ () └ <function run at 0x03C436A0>
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\nonebot__init__.py", line 335, in run get_driver().run(*args, **kwargs) │ │ └ {} │ └ () └ <function get_driver at 0x03C436E8>
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 186, in run uvicorn.run( │ └ <function run at 0x03EEDDF0> └ <module 'uvicorn' from 'C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker\.venv\lib\site-packages\uvicorn\_init...
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\uvicorn\main.py", line 579, in run server.run() │ └ <function Server.run at 0x03EEDF10> └ <uvicorn.server.Server object at 0x0E49E550>
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\uvicorn\server.py", line 65, in run return asyncio.run(self.serve(sockets=sockets)) │ │ │ │ └ None │ │ │ └ <function Server.serve at 0x03EEDF58> │ │ └ <uvicorn.server.Server object at 0x0E49E550> │ └ <function run at 0x038734A8> └ <module 'asyncio' from 'C:\Users\mcxia\AppData\Local\Programs\Python\Python310-32\lib\asyncio\init.py'>
File "C:\Users\mcxia\AppData\Local\Programs\Python\Python310-32\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) │ │ └ <coroutine object Server.serve at 0x01AF3610> │ └ <function BaseEventLoop.run_until_complete at 0x038751D8> └
File "C:\Users\mcxia\AppData\Local\Programs\Python\Python310-32\lib\asyncio\base_events.py", line 633, in run_until_complete self.run_forever() │ └ <function ProactorEventLoop.run_forever at 0x038C8E38> └
File "C:\Users\mcxia\AppData\Local\Programs\Python\Python310-32\lib\asyncio\windows_events.py", line 321, in run_forever super().run_forever()
File "C:\Users\mcxia\AppData\Local\Programs\Python\Python310-32\lib\asyncio\base_events.py", line 600, in run_forever self._run_once() │ └ <function BaseEventLoop._run_once at 0x03875F10> └
File "C:\Users\mcxia\AppData\Local\Programs\Python\Python310-32\lib\asyncio\base_events.py", line 1896, in _run_once handle._run() │ └ <function Handle._run at 0x01E6D4A8> └ <Handle Task.task_wakeup(<_GatheringFu...result=[None]>)>
File "C:\Users\mcxia\AppData\Local\Programs\Python\Python310-32\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, *self._args) │ │ │ │ │ └ <member '_args' of 'Handle' objects> │ │ │ │ └ <Handle Task.task_wakeup(<_GatheringFu...result=[None]>)> │ │ │ └ <member '_callback' of 'Handle' objects> │ │ └ <Handle Task.task_wakeup(<_GatheringFu...result=[None]>)> │ └ <member '_context' of 'Handle' objects> └ <Handle Task.task_wakeup(<_GatheringFu...result=[None]>)>
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\nonebot\message.py", line 476, in check_and_run_matcher await _run_matcher( └ <function _run_matcher at 0x03CF03D0>
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 850, in run await self.simple_run(bot, event, state, stack, dependency_cache) │ │ │ │ │ │ └ {<function _command at 0x03C74F58>: <Task finished name='Task-7669' coro=<_command() done, defined at C:\Users\mcxia\OneDrive...
│ │ │ │ │ └ <contextlib.AsyncExitStack object at 0x0FAB18F8> │ │ │ │ └ {'_prefix': {'command': None, 'raw_command': None, 'command_arg': None, 'command_start': None, 'command_whitespace': None}} │ │ │ └ GroupMessageEvent(time=1730210806, self_id=3758013446, post_type='message', sub_type='normal', user_id=3485462167, message_ty... │ │ └ Bot(type='OneBot V11', self_id='3758013446') │ └ <function Matcher.simple_run at 0x03C74DA8> └ Matcher(type='message', module=nonebot-plugin-ncm, lineno=103)
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 825, in simple_run await handler( └ Dependent(call=music_reply_receive)
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\nonebot\dependencies__init.py", line 94, in call__ return await cast(Callable[..., Awaitable[R]], self.call)(**values) │ │ │ │ │ │ └ {'bot': Bot(type='OneBot V11', self_id='3758013446'), 'event': GroupMessageEvent(time=1730210806, self_id=3758013446, post_ty... │ │ │ │ │ └ <function music_reply_receive at 0x063BFC88> │ │ │ │ └ Dependent(call=music_reply_receive) │ │ │ └ ~R │ │ └ <class 'collections.abc.Awaitable'> │ └ typing.Callable └ <function cast at 0x01D674A8>
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\nonebot-plugin-ncm__init__.py", line 158, in music_reply_receive await nncm.music_check(info["nid"], event) │ │ │ └ GroupMessageEvent(time=1730210806, self_id=3758013446, post_type='message', sub_type='normal', user_id=3485462167, message_ty... │ │ └ {'message_id': 922833209, 'type': 'song', 'nid': 2638574804, 'lid': 0, 'ids': [], 'lmsg': '', 'bot_id': '', 'time': 1730210800} │ └ <function Ncm.music_check at 0x063BAC88> └ <nonebot-plugin-ncm.data_source.Ncm object at 0x063B8B68>
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\nonebot-plugin-ncm\data_source.py", line 166, in music_check await self.start_upload(ids=nid, event=event) │ │ │ └ GroupMessageEvent(time=1730210806, self_id=3758013446, post_type='message', sub_type='normal', user_id=3485462167, message_ty... │ │ └ [2638574804] │ └ <function Ncm.start_upload at 0x063BAFA0> └ <nonebot-plugin-ncm.data_source.Ncm object at 0x063B8B68>
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\nonebot-plugin-ncm\data_source.py", line 300, in start_upload await self.upload(data[i], "song" if len(ids) == 1 else "list", event) │ │ │ │ │ └ GroupMessageEvent(time=1730210806, self_id=3758013446, post_type='message', sub_type='normal', user_id=3485462167, message_ty... │ │ │ │ └ [2638574804] │ │ │ └ 0 │ │ └ [{'id': 2638574804, 'url': 'http://m801.music.126.net/20241029223148/c8cf35d8d953fa451cb4d2b3e0f6081d/jdymusic/obj/wo3DlMOGwr... │ └ <function Ncm.upload at 0x063BAF58> └ <nonebot-plugin-ncm.data_source.Ncm object at 0x063B8B68>
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\nonebot-plugin-ncm\data_source.py", line 278, in upload download_ret: Dict[str, str] = await bot.download_file(url=url) │ │ └ 'http://m801.music.126.net/20241029223148/c8cf35d8d953fa451cb4d2b3e0f6081d/jdymusic/obj/wo3DlMOGwrbDjj7DisKw/55928050443/a8f6... │ └ Bot(type='OneBot V11', self_id='3758013446') └ typing.Dict
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\nonebot\internal\adapter\bot.py", line 122, in call_api raise exception └ NetWorkError(message='WebSocket call api download_file timeout')
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\nonebot\internal\adapter\bot.py", line 97, in call_api result = await self.adapter._call_api(self, api, **data) │ │ │ │ │ └ {'url': 'http://m801.music.126.net/20241029223148/c8cf35d8d953fa451cb4d2b3e0f6081d/jdymusic/obj/wo3DlMOGwrbDjj7DisKw/55928050... │ │ │ │ └ 'download_file' │ │ │ └ Bot(type='OneBot V11', self_id='3758013446') │ │ └ <function Adapter._call_api at 0x03D51E80> │ └ Adapter(name='OneBot V11') └ Bot(type='OneBot V11', self_id='3758013446')
File "C:\Users\mcxia\OneDrive\Desktop\幻歆的项目\hxbot_docker.venv\lib\site-packages\nonebot\adapters\onebot\v11\adapter.py", line 177, in _call_api raise NetworkError(f"WebSocket call api {api} timeout") from None └ <class 'nonebot.adapters.onebot.v11.exception.NetworkError'>
nonebot.adapters.onebot.v11.exception.NetworkError: NetWorkError(message='WebSocket call api download_file timeout')