05-06 18:56:52 [ERROR] nonebot | Error when running CallingAPI hook. Running cancelled!
Traceback (most recent call last):
File "/usr/lib/python3.11/urllib/request.py", line 1505, in open_local_file
stats = os.stat(localfile)
FileNotFoundError: [Errno 2] No such file or directory: '/home/Neko/Bot/zhenxun'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/Neko/Bot/zhenxun_bot/bot.py", line 33, in <module>
nonebot.run()
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/nonebot/__init__.py", line 309, in run
get_driver().run(*args, **kwargs)
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/nonebot/drivers/fastapi.py", line 198, in run
uvicorn.run(
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/uvicorn/main.py", line 578, in run
server.run()
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/uvicorn/server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/nonebot/message.py", line 141, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/nonebot/message.py", line 187, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/nonebot/internal/matcher/matcher.py", line 753, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/nonebot/internal/matcher/matcher.py", line 728, in simple_run
await handler(
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/nonebot/dependencies/__init__.py", line 108, in __call__
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "/home/Neko/Bot/zhenxun_bot/plugins/ai/__init__.py", line 65, in _
await ai.finish(hello())
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/nonebot/internal/matcher/matcher.py", line 481, in finish
await cls.send(message, **kwargs)
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/nonebot/internal/matcher/matcher.py", line 466, in send
return await bot.send(event=event, message=_message, **kwargs)
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/nonebot_plugin_guild_patch/__init__.py", line 30, in patched_send
return await original_send(self, event, message, **kwargs)
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/nonebot/adapters/onebot/v11/bot.py", line 220, in send
return await self.__class__.send_handler(self, event, message, **kwargs)
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/nonebot/adapters/onebot/v11/bot.py", line 174, in send
return await bot.send_msg(**params)
> File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-uIXH1-31-py3.11/lib/python3.11/site-packages/nonebot/internal/adapter/bot.py", line 83, in call_api
await asyncio.gather(*coros)
File "/home/Neko/Bot/zhenxun_bot/extensive_plugin/nonebot_plugin_watermarker/__init__.py", line 36, in _handle
if image := str2img(file):
File "/home/Neko/Bot/zhenxun_bot/extensive_plugin/nonebot_plugin_watermarker/fuctions.py", line 32, in str2img
bytes = urllib.request.urlopen(string).read()
File "/usr/lib/python3.11/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.11/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/usr/lib/python3.11/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.11/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/usr/lib/python3.11/urllib/request.py", line 1483, in file_open
return self.open_local_file(req)
File "/usr/lib/python3.11/urllib/request.py", line 1522, in open_local_file
raise URLError(exp)
urllib.error.URLError: <urlopen error [Errno 2] No such file or directory: '/home/Neko/Bot/zhenxun'>
用的是真寻bot,正确的文件夹路径应该是/home/Neko/Bot/zhenxun_bot/extensive_plugin/nonebot_plugin_watermarker/watermarker_image,但是运行的时候就出现上面的报错