zjkwdy/nonebot_plugin_weather_lite

执行 天气查询 v2 正常,v3 以及天气报错

Opened this issue · 1 comments

12-16 09:52:56 [SUCCESS] nonebot | OneBot V11 1295 | [message.private.friend]: Message 1186048480 from 1074 "#天气 上海_format=v3"
12-16 09:52:56 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_weather_lite)
12-16 09:52:58 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_weather_lite) running complete
12-16 09:52:58 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_weather_lite) failed.
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/bin/nb", line 8, in
sys.exit(main())
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nb_cli/commands/main.py", line 30, in run
run_bot(file, app)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nb_cli/handlers/deploy.py", line 25, in run_bot
nonebot.run(app=f"{module_name}:{app}")
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot/init.py", line 273, in run
get_driver().run(*args, **kwargs)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot/drivers/fastapi.py", line 172, in run
uvicorn.run(
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/uvicorn/main.py", line 569, in run
server.run()
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot/message.py", line 142, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)

File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot/message.py", line 188, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot/internal/matcher/matcher.py", line 727, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot/internal/matcher/matcher.py", line 702, in simple_run
await handler(
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot/dependencies/init.py", line 108, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot_plugin_weather_lite/init.py", line 21, in _
await wettr.send(MessageSegment.image(file=f'http://zh.wttr.in/{escape(city)}.png', cache=False), at_sender=True)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot/internal/matcher/matcher.py", line 461, in send
return await bot.send(event=event, message=_message, **kwargs)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot/adapters/onebot/v11/bot.py", line 219, in send
return await self.class.send_handler(self, event, message, **kwargs)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot/adapters/onebot/v11/bot.py", line 174, in send
return await bot.send_msg(**params)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot/internal/adapter/bot.py", line 120, in call_api
raise exception
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot/internal/adapter/bot.py", line 98, in call_api
result = await self.adapter._call_api(self, api, **data)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot/adapters/onebot/v11/adapter.py", line 132, in _call_api
return handle_api_result(
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-GV7Dnhhv-py3.9/lib/python3.9/site-packages/nonebot/adapters/onebot/v11/utils.py", line 58, in handle_api_result
raise ActionFailed(**result)
nonebot.adapters.onebot.v11.exception.ActionFailed

同v3无图,其余正常。这是gocq给出的信息
[WARNING]: 警告: 群 xxx 图片上传失败: image type error: application/octet-stream