cpuopt / nonebot_plugin_imgexploration Goto Github PK
View Code? Open in Web Editor NEWGoogle、Yandx和基于PicImageSearch的saucenao、ascii2d搜图
License: MIT License
Google、Yandx和基于PicImageSearch的saucenao、ascii2d搜图
License: MIT License
(robot) PS C:\Users\ReiLove\Desktop\bot\robot> nb run --reload
使用 Python: C:\Users\ReiLove\Desktop\bot\robot.venv\Scripts\python.exe
启动重载监视,当前进程 [24060].
03-23 12:03:54 [SUCCESS] nonebot | NoneBot is initializing...
03-23 12:03:54 [INFO] nonebot | Current Env: prod
03-23 12:03:55 [ERROR] nonebot | Failed to import "nonebot_plugin_guild_patch"
Traceback (most recent call last):
File "C:\Users\ReiLove\Desktop\bot\robot\bot.py", line 8, in
nonebot.load_plugin('nonebot_plugin_guild_patch')
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\load.py", line 39, in load_plugin
return manager.load_plugin(module_path)
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\manager.py", line 142, in load_plugin
module = importlib.import_module(name)
File "C:\Users\ReiLove\AppData\Local\Programs\Python\Python310\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\manager.py", line 242, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot_plugin_guild_patch_init.py", line 6, in
from .models import (
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot_plugin_guild_patch\models.py", line 30, in
class GuildMessageEvent(MessageEvent):
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot_plugin_guild_patch\models.py", line 50, in GuildMessageEvent
@root_validator(pre=False)
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\pydantic\deprecated\class_validators.py", line 237, in root_validator
raise PydanticUserError(
pydantic.errors.PydanticUserError: If you use@root_validator
with pre=False (the default) you MUST specifyskip_on_failure=True
. Note that@root_validator
is deprecated and should be replaced with@model_validator
.
For further information visit https://errors.pydantic.dev/2.6/u/root-validator-pre-skip
03-23 12:03:55 [ERROR] nonebot | Failed to import "nonebot_plugin_guild_patch"
Traceback (most recent call last):
File "C:\Users\ReiLove\Desktop\bot\robot\bot.py", line 14, in
nonebot.load_from_toml("pyproject.toml")
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\load.py", line 130, in load_from_toml
return load_all_plugins(plugins, plugin_dirs)
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\load.py", line 64, in load_all_plugins
return manager.load_all_plugins()
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\manager.py", line 176, in load_all_plugins
return set(
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\manager.py", line 177, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\manager.py", line 142, in load_plugin
module = importlib.import_module(name)
File "C:\Users\ReiLove\AppData\Local\Programs\Python\Python310\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\manager.py", line 242, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot_plugin_imgexploration_init.py", line 10, in
require("nonebot_plugin_guild_patch")
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\load.py", line 173, in require
plugin = manager.load_plugin(name)
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\manager.py", line 142, in load_plugin
module = importlib.import_module(name)
File "C:\Users\ReiLove\AppData\Local\Programs\Python\Python310\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\manager.py", line 242, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot_plugin_guild_patch_init.py", line 6, in
from .models import (
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot_plugin_guild_patch\models.py", line 30, in
class GuildMessageEvent(MessageEvent):
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot_plugin_guild_patch\models.py", line 50, in GuildMessageEvent
@root_validator(pre=False)
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\pydantic\deprecated\class_validators.py", line 237, in root_validator
raise PydanticUserError(
pydantic.errors.PydanticUserError: If you use@root_validator
with pre=False (the default) you MUST specifyskip_on_failure=True
. Note that@root_validator
is deprecated and should be replaced with@model_validator
.
For further information visit https://errors.pydantic.dev/2.6/u/root-validator-pre-skip
03-23 12:03:55 [ERROR] nonebot | Failed to import "nonebot_plugin_imgexploration"
Traceback (most recent call last):
File "C:\Users\ReiLove\Desktop\bot\robot\bot.py", line 14, in
nonebot.load_from_toml("pyproject.toml")
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\load.py", line 130, in load_from_toml
return load_all_plugins(plugins, plugin_dirs)
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\load.py", line 64, in load_all_plugins
return manager.load_all_plugins()
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\manager.py", line 176, in load_all_plugins
return set(
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\manager.py", line 177, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\manager.py", line 142, in load_plugin
module = importlib.import_module(name)
File "C:\Users\ReiLove\AppData\Local\Programs\Python\Python310\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\manager.py", line 242, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot_plugin_imgexploration_init.py", line 10, in
require("nonebot_plugin_guild_patch")
File "C:\Users\ReiLove\Desktop\bot\robot.venv\lib\site-packages\nonebot\plugin\load.py", line 183, in require
raise RuntimeError(f'Cannot load plugin "{name}"!')
RuntimeError: Cannot load plugin "nonebot_plugin_guild_patch"!
03-23 12:03:55 [SUCCESS] nonebot | Running NoneBot...
03-23 12:03:55 [INFO] uvicorn | Started server process [20656]
03-23 12:03:55 [INFO] uvicorn | Waiting for application startup.
03-23 12:03:55 [INFO] uvicorn | Application startup complete.
03-23 12:03:55 [INFO] uvicorn | Uvicorn running on http://127.0.0.1:8080 (Press CTRL+C to quit)
多次重新安装插件仍无法解决
E: ClientProxyConnectionError(ConnectionKey(host='localhost', port=7890, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, 'Connection refused'))
01-30 09:48:39 [DEBUG] nonebot | Succeeded to load adapter "OneBot V11"
01-30 09:48:39 [SUCCESS] nonebot | Succeeded to import "echo"
01-30 09:48:40 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_heweather"
01-30 09:48:40 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_pixivrank_search"
01-30 09:48:40 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_guild_patch"
01-30 09:48:40 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_abbrreply"
01-30 09:48:40 [DEBUG] nonebot_plugin_trace_moe | 2
01-30 09:48:40 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_trace_moe"
01-30 09:48:40 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_htmlrender"
01-30 09:48:40 [ERROR] nonebot | Failed to import "nonebot_plugin_imgexploration"
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/usr/lib/python3.8/multiprocessing/spawn.py", line 129, in _main
return self._bootstrap(parent_sentinel)
File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.8/dist-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
File "/usr/local/lib/python3.8/dist-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.8/dist-packages/uvicorn/server.py", line 67, in serve
config.load()
File "/usr/local/lib/python3.8/dist-packages/uvicorn/config.py", line 477, in load
self.loaded_app = import_from_string(self.app)
File "/usr/local/lib/python3.8/dist-packages/uvicorn/importer.py", line 21, in import_from_string
module = importlib.import_module(module_str)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/root/LING/./bot.py", line 27, in
nonebot.load_from_toml("pyproject.toml")
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/load.py", line 122, in load_from_toml
return load_all_plugins(plugins, plugin_dirs)
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/load.py", line 59, in load_all_plugins
return manager.load_all_plugins()
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/manager.py", line 168, in load_all_plugins
return set(
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/manager.py", line 169, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/manager.py", line 141, in load_plugin
module = importlib.import_module(name)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/manager.py", line 233, in exec_module
super().exec_module(module)
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/usr/local/lib/python3.8/dist-packages/nonebot_plugin_imgexploration/init.py", line 10, in
from .imgexploration import Imgexploration
File "/usr/local/lib/python3.8/dist-packages/nonebot_plugin_imgexploration/imgexploration.py", line 13, in
class Imgexploration:
File "/usr/local/lib/python3.8/dist-packages/nonebot_plugin_imgexploration/imgexploration.py", line 95, in Imgexploration
async def ImageBatchDownload(urls: list, client: httpx.AsyncClient) -> list[bytes]:
TypeError: 'type' object is not subscriptable
使用搜图功能后
[ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_imgexploration) failed.
Traceback (most recent call last):
File "", line 15, in
File "F:\Nahida.venv\lib\site-packages\nonebot_init_.py", line 333, in run
get_driver().run(*args, **kwargs)
File "F:\Nahida.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 199, in run
uvicorn.run(
File "F:\Nahida.venv\lib\site-packages\uvicorn\main.py", line 587, in run
server.run()
File "F:\Nahida.venv\lib\site-packages\uvicorn\server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 636, in run_until_complete
self.run_forever()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 603, in run_forever
self._run_once()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1906, in _run_once
handle._run()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "F:\Nahida.venv\lib\site-packages\nonebot\message.py", line 467, in check_and_run_matcher
await _run_matcher(
File "F:\Nahida.venv\lib\site-packages\nonebot\message.py", line 419, in run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "F:\Nahida.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 759, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "F:\Nahida.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 734, in simple_run
await handler(
File "F:\Nahida.venv\lib\site-packages\nonebot\dependencies_init.py", line 108, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "F:\Nahida.venv\lib\site-packages\nonebot_plugin_imgexploration_init_.py", line 53, in get_pic
search = Imgexploration(
File "F:\Nahida.venv\lib\site-packages\nonebot_plugin_imgexploration\imgexploration.py", line 25, in init
self.setFront(big_size=25, nomal_size=20, small_size=15)
File "F:\Nahida.venv\lib\site-packages\nonebot_plugin_imgexploration\imgexploration.py", line 91, in setFront
self.__font_b = ImageFont.truetype("HarmonyOS_Sans_SC_Regular", big_size)
File "F:\Nahida.venv\lib\site-packages\PIL\ImageFont.py", line 996, in truetype
return freetype(font)
File "F:\Nahida.venv\lib\site-packages\PIL\ImageFont.py", line 993, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "F:\Nahida.venv\lib\site-packages\PIL\ImageFont.py", line 248, in init
self.font = core.getfont(
OSError: cannot open resource
06-10 12:19:33 [SUCCESS] nonebot_plugin_imgexploration | 获取到图片: https://c2cpicdw.qpic.cn/offpic_new/0/3346096023-1805399130-04709CC7B86067454BC575B8F100157F/0?term=3
06-10 12:19:33 [INFO] nonebot_plugin_gocqhttp | [3456214440] 发送好友 334xxxxxx) 的消息: [{"type": ... (1330599130)
06-10 12:19:34 [INFO] nonebot_plugin_imgexploration | 图片上传到Imgops
06-10 12:19:35 [INFO] nonebot_plugin_imgexploration | saucenao searching...
06-10 12:19:36 [INFO] nonebot_plugin_imgexploration | ascii2d searching...
06-10 12:19:36 [INFO] nonebot_plugin_imgexploration | google searching...
06-10 12:19:36 [INFO] nonebot_plugin_imgexploration | yandex searching...
06-10 12:19:37 [SUCCESS] nonebot_plugin_imgexploration | saucenao result:0
06-10 12:19:37 [SUCCESS] nonebot_plugin_imgexploration | ascii2d result:0
06-10 12:19:38 [ERROR] nonebot_plugin_imgexploration | substring not found
06-10 12:19:38 [SUCCESS] nonebot_plugin_imgexploration | google result:0
06-10 12:19:38 [ERROR] nonebot_plugin_imgexploration | list index out of range
06-10 12:19:38 [INFO] nonebot_plugin_imgexploration | Drawing... total:0
`[ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_imgexploration) failed.
Traceback (most recent call last):
File "C:\Users\1\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\1\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\Scripts\nb.exe_main.py", line 7, in
sys.exit(main())
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\click\core.py", line 760, in invoke
return _callback(*args, **kwargs)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\nb_cli\commands\main.py", line 30, in run
run_bot(file, app)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\nb_cli\handlers\deploy.py", line 25, in run_bot
nonebot.run(app=f"{module_name}:{app}")
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\nonebot_init.py", line 273, in run
get_driver().run(*args, **kwargs)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\nonebot\drivers\fastapi.py", line 172, in run
uvicorn.run(
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\uvicorn\main.py", line 569, in run
server.run()
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\uvicorn\server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Users\1\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\1\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 633, in run_until_complete
self.run_forever()
File "C:\Users\1\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "C:\Users\1\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 600, in run_forever
self._run_once()
File "C:\Users\1\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1896, in _run_once
handle._run()
File "C:\Users\1\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\nonebot\message.py", line 142, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\nonebot\message.py", line 188, in run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\nonebot\internal\matcher\matcher.py", line 727, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\nonebot\internal\matcher\matcher.py", line 702, in simple_run
await handler(
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\nonebot\dependencies_init.py", line 108, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\nonebot_plugin_imgexploration_init_.py", line 47, in get_pic
search = Imgexploration(pic_url=pic_url, client=client,proxy=f"http://127.0.0.1:{proxy_port}", saucenao_apikey=saucenao_apikey)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\nonebot_plugin_imgexploration\imgexploration.py", line 25, in init
self.setFront(big_size=25, nomal_size=20, small_size=15)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\nonebot_plugin_imgexploration\imgexploration.py", line 90, in setFront
self.__font_b = ImageFont.truetype("HarmonyOS_Sans_SC_Regular", big_size)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\PIL\ImageFont.py", line 1008, in truetype
return freetype(font)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\PIL\ImageFont.py", line 1005, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "C:\Users\1\AppData\Local\pypoetry\Cache\virtualenvs\webot-bWFYmPaM-py3.10\lib\site-packages\PIL\ImageFont.py", line 255, in init
self.font = core.getfont(
OSError: cannot open resource`
The plugin crashes after sending image.
01-08 21:32:17 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_imgexploration) running complete
01-08 21:32:17 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_imgexploration) failed.
Traceback (most recent call last):
File "/udisk/bot/.venv/lib/python3.9/site-packages/nest_asyncio.py", line 35, in run
return loop.run_until_complete(task)
│ │ └ <Task cancelling name='Task-3513' coro=<Imgexploration.doSearch() running at /udisk/bot/.venv/lib/python3.9/site-packages/non...
│ └ <method 'run_until_complete' of 'uvloop.loop.Loop' objects>
└ <uvloop.Loop running=True closed=False debug=False>
File "uvloop/loop.pyx", line 1511, in uvloop.loop.Loop.run_until_complete
raise
File "uvloop/loop.pyx", line 1504, in uvloop.loop.Loop.run_until_complete
self.run_forever()
File "uvloop/loop.pyx", line 1377, in uvloop.loop.Loop.run_forever
self._run(mode)
File "uvloop/loop.pyx", line 518, in uvloop.loop.Loop._run
raise RuntimeError('this event loop is already running.')
RuntimeError: this event loop is already running.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/udisk/bot/.venv/bin/nb", line 8, in <module>
sys.exit(main())
│ │ └ <ClickAliasedGroup main>
│ └ <built-in function exit>
└ <module 'sys' (built-in)>
File "/udisk/bot/.venv/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
│ │ │ └ {}
│ │ └ ()
│ └ <function BaseCommand.main at 0xffff80e38dc0>
└ <ClickAliasedGroup main>
File "/udisk/bot/.venv/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
│ │ └ <click.core.Context object at 0xffff810321f0>
│ └ <function MultiCommand.invoke at 0xffff80dbcdc0>
└ <ClickAliasedGroup main>
File "/udisk/bot/.venv/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
│ │ │ │ └ <click.core.Context object at 0xffff81032d30>
│ │ │ └ <function Command.invoke at 0xffff80dbc8b0>
│ │ └ <ClickAliasedCommand run>
│ └ <click.core.Context object at 0xffff81032d30>
└ <function MultiCommand.invoke.<locals>._process_result at 0xffff81031d30>
File "/udisk/bot/.venv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
│ │ │ │ │ └ {'file': 'bot.py', 'app': 'app'}
│ │ │ │ └ <click.core.Context object at 0xffff81032d30>
│ │ │ └ <function run at 0xffff7e35d3a0>
│ │ └ <ClickAliasedCommand run>
│ └ <function Context.invoke at 0xffff80e38670>
└ <click.core.Context object at 0xffff81032d30>
File "/udisk/bot/.venv/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
│ └ {'file': 'bot.py', 'app': 'app'}
└ ()
File "/udisk/bot/.venv/lib/python3.9/site-packages/nb_cli/commands/main.py", line 30, in run
run_bot(file, app)
│ │ └ 'app'
│ └ 'bot.py'
└ <function run_bot at 0xffff7e349ee0>
File "/udisk/bot/.venv/lib/python3.9/site-packages/nb_cli/handlers/deploy.py", line 25, in run_bot
nonebot.run(app=f"{module_name}:{app}")
│ └ <function run at 0xffff7f5ddaf0>
└ <module 'nonebot' from '/udisk/bot/.venv/lib/python3.9/site-packages/nonebot/__init__.py'>
File "/udisk/bot/.venv/lib/python3.9/site-packages/nonebot/__init__.py", line 273, in run
get_driver().run(*args, **kwargs)
│ │ └ {'app': 'bot:app'}
│ └ ()
└ <function get_driver at 0xffff7faf3550>
File "/udisk/bot/.venv/lib/python3.9/site-packages/nonebot/drivers/fastapi.py", line 172, in run
uvicorn.run(
│ └ <function run at 0xffff7e00a5e0>
└ <module 'uvicorn' from '/udisk/bot/.venv/lib/python3.9/site-packages/uvicorn/__init__.py'>
File "/udisk/bot/.venv/lib/python3.9/site-packages/uvicorn/main.py", line 569, in run
server.run()
│ └ <function Server.run at 0xffff7e00a9d0>
└ <uvicorn.server.Server object at 0xffff64346460>
File "/udisk/bot/.venv/lib/python3.9/site-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
│ │ │ │ └ None
│ │ │ └ <function Server.serve at 0xffff7e00aa60>
│ │ └ <uvicorn.server.Server object at 0xffff64346460>
│ └ <function _patch_asyncio.<locals>.run at 0xffff647f1310>
└ <module 'asyncio' from '/usr/local/lib/python3.9/asyncio/__init__.py'>
File "/udisk/bot/.venv/lib/python3.9/site-packages/nest_asyncio.py", line 35, in run
return loop.run_until_complete(task)
│ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /udisk/bot/.venv/lib/python3.9/site-packages/uvicorn/server.py:80...
│ └ <method 'run_until_complete' of 'uvloop.loop.Loop' objects>
└ <uvloop.Loop running=True closed=False debug=False>
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 339, in __wakeup
self.__step()
└ <Task pending name='Task-3480' coro=<_check_matcher() running at /udisk/bot/.venv/lib/python3.9/site-packages/nonebot/message...
File "/udisk/bot/.venv/lib/python3.9/site-packages/nest_asyncio.py", line 196, in step
step_orig(task, exc)
│ │ └ None
│ └ <Task pending name='Task-3480' coro=<_check_matcher() running at /udisk/bot/.venv/lib/python3.9/site-packages/nonebot/message...
└ <function Task.__step at 0xffff8010e550>
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 256, in __step
result = coro.send(None)
│ └ <method 'send' of 'coroutine' objects>
└ <coroutine object _check_matcher at 0xffff58309240>
File "/udisk/bot/.venv/lib/python3.9/site-packages/nonebot/message.py", line 142, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
│ │ │ │ │ │ └ {<function Matcher.got.<locals>._key_getter at 0xffff642e5d30>: <Task finished name='Task-3502' coro=<Matcher.got.<locals>._k...
│ │ │ │ │ └ <contextlib.AsyncExitStack object at 0xffff582a12e0>
│ │ │ │ └ {'_prefix': {'command': None, 'raw_command': None, 'command_arg': None, 'command_start': None}}
│ │ │ └ PrivateMessageEvent(time=1673184736, self_id=2653148271, post_type='message', sub_type='friend', user_id=259****810, message_...
│ │ └ Bot(type='OneBot V11', self_id='2653148271')
│ └ Matcher(type='message', module=nonebot_plugin_imgexploration)
└ <function _run_matcher at 0xffff7e282550>
> File "/udisk/bot/.venv/lib/python3.9/site-packages/nonebot/message.py", line 188, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
│ │ │ │ │ │ └ {<function Matcher.got.<locals>._key_getter at 0xffff642e5d30>: <Task finished name='Task-3502' coro=<Matcher.got.<locals>._k...
│ │ │ │ │ └ <contextlib.AsyncExitStack object at 0xffff582a12e0>
│ │ │ │ └ {'_prefix': {'command': None, 'raw_command': None, 'command_arg': None, 'command_start': None}}
│ │ │ └ PrivateMessageEvent(time=1673184736, self_id=2653148271, post_type='message', sub_type='friend', user_id=259****810, message_...
│ │ └ Bot(type='OneBot V11', self_id='2653148271')
│ └ <function Matcher.run at 0xffff80efd310>
└ Matcher(type='message', module=nonebot_plugin_imgexploration)
File "/udisk/bot/.venv/lib/python3.9/site-packages/nonebot/internal/matcher/matcher.py", line 727, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
│ │ │ │ │ │ └ {<function Matcher.got.<locals>._key_getter at 0xffff642e5d30>: <Task finished name='Task-3502' coro=<Matcher.got.<locals>._k...
│ │ │ │ │ └ <contextlib.AsyncExitStack object at 0xffff582a12e0>
│ │ │ │ └ {'_prefix': {'command': None, 'raw_command': None, 'command_arg': None, 'command_start': None}}
│ │ │ └ PrivateMessageEvent(time=1673184736, self_id=2653148271, post_type='message', sub_type='friend', user_id=259****810, message_...
│ │ └ Bot(type='OneBot V11', self_id='2653148271')
│ └ <function Matcher.simple_run at 0xffff80efd3a0>
└ Matcher(type='message', module=nonebot_plugin_imgexploration)
File "/udisk/bot/.venv/lib/python3.9/site-packages/nonebot/internal/matcher/matcher.py", line 702, in simple_run
await handler(
└ Dependent(call=get_pic, parameterless=(Depends(Dependent(call=_key_getter)),))
File "/udisk/bot/.venv/lib/python3.9/site-packages/nonebot/dependencies/__init__.py", line 108, in __call__
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
│ │ │ │ │ │ └ {'bot': Bot(type='OneBot V11', self_id='2653148271'), 'event': PrivateMessageEvent(time=1673184736, self_id=2653148271, post_...
│ │ │ │ │ └ <function get_pic at 0xffff7e1668b0>
│ │ │ │ └ Dependent(call=get_pic, parameterless=(Depends(Dependent(call=_key_getter)),))
│ │ │ └ ~R
│ │ └ typing.Awaitable
│ └ typing.Callable
└ <function cast at 0xffff81016af0>
File "/udisk/bot/.venv/lib/python3.9/site-packages/nonebot_plugin_imgexploration/__init__.py", line 51, in get_pic
search.run()
│ └ <function Imgexploration.run at 0xffff642e5c10>
└ <nonebot_plugin_imgexploration.imgexploration.Imgexploration object at 0xffff582a1250>
File "/udisk/bot/.venv/lib/python3.9/site-packages/nonebot_plugin_imgexploration/imgexploration.py", line 448, in run
asyncio.run(self.doSearch())
│ │ │ └ <function Imgexploration.doSearch at 0xffff642e5b80>
│ │ └ <nonebot_plugin_imgexploration.imgexploration.Imgexploration object at 0xffff582a1250>
│ └ <function _patch_asyncio.<locals>.run at 0xffff647f1310>
└ <module 'asyncio' from '/usr/local/lib/python3.9/asyncio/__init__.py'>
File "/udisk/bot/.venv/lib/python3.9/site-packages/nest_asyncio.py", line 40, in run
loop.run_until_complete(task)
│ │ └ <Task cancelling name='Task-3513' coro=<Imgexploration.doSearch() running at /udisk/bot/.venv/lib/python3.9/site-packages/non...
│ └ <method 'run_until_complete' of 'uvloop.loop.Loop' objects>
└ <uvloop.Loop running=True closed=False debug=False>
File "uvloop/loop.pyx", line 1511, in uvloop.loop.Loop.run_until_complete
raise
File "uvloop/loop.pyx", line 1504, in uvloop.loop.Loop.run_until_complete
self.run_forever()
File "uvloop/loop.pyx", line 1377, in uvloop.loop.Loop.run_forever
self._run(mode)
File "uvloop/loop.pyx", line 518, in uvloop.loop.Loop._run
raise RuntimeError('this event loop is already running.')
RuntimeError: this event loop is already running.
01-02 21:46:36 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_imgexploration, lineno=37) failed.
Traceback (most recent call last):
File "", line 1, in
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\spawn.py", line 122, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\spawn.py", line 135, in _main
return self._bootstrap(parent_sentinel)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py", line 314, in _bootstrap
self.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\hou33\Desktop\lostark-bot\lostark.venv\Lib\site-packages\uvicorn_subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
File "C:\Users\hou33\Desktop\lostark-bot\lostark.venv\Lib\site-packages\uvicorn\server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 640, in run_until_complete
self.run_forever()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 607, in run_forever
self._run_once()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 1922, in _run_once
handle._run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\hou33\Desktop\lostark-bot\lostark.venv\Lib\site-packages\nonebot\message.py", line 476, in check_and_run_matcher
await _run_matcher(
File "C:\Users\hou33\Desktop\lostark-bot\lostark.venv\Lib\site-packages\nonebot\message.py", line 428, in run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\Users\hou33\Desktop\lostark-bot\lostark.venv\Lib\site-packages\nonebot\internal\matcher\matcher.py", line 846, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\Users\hou33\Desktop\lostark-bot\lostark.venv\Lib\site-packages\nonebot\internal\matcher\matcher.py", line 821, in simple_run
await handler(
File "C:\Users\hou33\Desktop\lostark-bot\lostark.venv\Lib\site-packages\nonebot\dependencies_init.py", line 113, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "C:\Users\hou33\Desktop\lostark-bot\lostark.venv\Lib\site-packages\nonebot_plugin_imgexploration_init_.py", line 53, in get_pic
search = Imgexploration(
File "C:\Users\hou33\Desktop\lostark-bot\lostark.venv\Lib\site-packages\nonebot_plugin_imgexploration\imgexploration.py", line 25, in init
self.setFront(big_size=25, nomal_size=20, small_size=15)
File "C:\Users\hou33\Desktop\lostark-bot\lostark.venv\Lib\site-packages\nonebot_plugin_imgexploration\imgexploration.py", line 91, in setFront
self.__font_b = ImageFont.truetype("HarmonyOS_Sans_SC_Regular", big_size)
File "C:\Users\hou33\Desktop\lostark-bot\lostark.venv\Lib\site-packages\PIL\ImageFont.py", line 819, in truetype
return freetype(font)
File "C:\Users\hou33\Desktop\lostark-bot\lostark.venv\Lib\site-packages\PIL\ImageFont.py", line 816, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "C:\Users\hou33\Desktop\lostark-bot\lostark.venv\Lib\site-packages\PIL\ImageFont.py", line 245, in init
self.font = core.getfont(
OSError: cannot open resource
02-12 02:58:47 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_imgexploration) failed.
Traceback (most recent call last):
File "", line 17, in
File "/opt/first/.venv/lib/python3.10/site-packages/nonebot/init.py", line 273, in run
get_driver().run(*args, **kwargs)
File "/opt/first/.venv/lib/python3.10/site-packages/nonebot/drivers/fastapi.py", line 187, in run
uvicorn.run(
File "/opt/first/.venv/lib/python3.10/site-packages/uvicorn/main.py", line 569, in run
server.run()
File "/opt/first/.venv/lib/python3.10/site-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/opt/first/.venv/lib/python3.10/site-packages/nonebot/message.py", line 141, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
File "/opt/first/.venv/lib/python3.10/site-packages/nonebot/message.py", line 187, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "/opt/first/.venv/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 732, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "/opt/first/.venv/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 707, in simple_run
await handler(
File "/opt/first/.venv/lib/python3.10/site-packages/nonebot/dependencies/init.py", line 108, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "/opt/first/.venv/lib/python3.10/site-packages/nonebot_plugin_imgexploration/init.py", line 49, in get_pic
await search.doSearch()
File "/opt/first/.venv/lib/python3.10/site-packages/nonebot_plugin_imgexploration/imgexploration.py", line 411, in doSearch
self.__result_info = (await task_saucenao) + (await task_ascii2d) + (await task_google) + (await task_yandex)
File "/opt/first/.venv/lib/python3.10/site-packages/nonebot_plugin_imgexploration/imgexploration.py", line 355, in __ascii2d_build_result
logger.success(f"ascii2d result:{len(result_li)}")
UnboundLocalError: local variable 'result_li' referenced before assignment
02-12 02:58:47 [ERROR] nonebot_plugin_imgexploration | [Errno -2] Name or service not known
02-12 02:58:47 [SUCCESS] nonebot_plugin_imgexploration | google result:0
02-12 02:58:47 [ERROR] nonebot_plugin_imgexploration | [Errno -2] Name or service not known
第二个问题,proxy变量应该不是必填项吧,我本地走openwrt,不需要在系统上单独设置proxy
发送图片后出现
[ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_imgexploration) failed.
OSError: cannot open resource
06-21 11:24:43 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_imgexploration) running complete
06-21 11:24:43 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_imgexploration) failed.
Traceback (most recent call last):
File "", line 19, in
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\nonebot_init_.py", line 309, in run
get_driver().run(*args, **kwargs)
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\nonebot\drivers\fastapi.py", line 198, in run
uvicorn.run(
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\uvicorn\main.py", line 578, in run
server.run()
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\uvicorn\server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Users\Histion\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
File "C:\Users\Histion\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
File "C:\Users\Histion\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 640, in run_until_complete
self.run_forever()
File "C:\Users\Histion\AppData\Local\Programs\Python\Python311\Lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "C:\Users\Histion\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 607, in run_forever
self._run_once()
File "C:\Users\Histion\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 1922, in _run_once
handle._run()
File "C:\Users\Histion\AppData\Local\Programs\Python\Python311\Lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\nonebot\message.py", line 467, in check_and_run_matcher
await _run_matcher(
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\nonebot\message.py", line 419, in run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\nonebot\internal\matcher\matcher.py", line 753, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\nonebot\internal\matcher\matcher.py", line 728, in simple_run
await handler(
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\nonebot\dependencies_init.py", line 108, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\nonebot_plugin_imgexploration_init_.py", line 53, in get_pic
search = Imgexploration(
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\nonebot_plugin_imgexploration\imgexploration.py", line 25, in init
self.setFront(big_size=25, nomal_size=20, small_size=15)
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\nonebot_plugin_imgexploration\imgexploration.py", line 91, in setFront
self.__font_b = ImageFont.truetype("HarmonyOS_Sans_SC_Regular", big_size)
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\PIL\ImageFont.py", line 996, in truetype
return freetype(font)
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\PIL\ImageFont.py", line 993, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "C:\Users\Histion\Desktop\1\first.venv\Lib\site-packages\PIL\ImageFont.py", line 248, in init
self.font = core.getfont(
OSError: cannot open resource
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.