bot-ssttkkl / nonebot-plugin-pixivbot Goto Github PK
View Code? Open in Web Editor NEWNoneBot插件,发送随机Pixiv插画、画师更新推送、定时订阅推送……
License: MIT License
NoneBot插件,发送随机Pixiv插画、画师更新推送、定时订阅推送……
License: MIT License
schedle random_illust 01:00*x ロリ [PyBot][08:36:50.480][INFO] [message] 触发 Matcher(type='message', module=nonebot_plugin_pixivbot.handler.command.command) [PyBot][08:36:50.497][ERROR] [message]Running Matcher(type='message', module=nonebot_plugin_pixivbot.handler.command.command) failed. Traceback (most recent call last): File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot/message.py", line 141, in _check_matcher await _run_matcher(Matcher, bot, event, state, stack, dependency_cache) > File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot/message.py", line 187, in _run_matcher await matcher.run(bot, event, state, stack, dependency_cache) File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot/internal/matcher/matcher.py", line 753, in run await self.simple_run(bot, event, state, stack, dependency_cache) File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot/internal/matcher/matcher.py", line 728, in simple_run await handler( File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot/dependencies/init.py", line 104, in call values = await self.solve(**kwargs) File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot/dependencies/init.py", line 219, in solve values = await asyncio.gather( File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot/dependencies/init.py", line 208, in _solve_field value = await cast(Param, field.field_info)._solve(**params) File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot/internal/params.py", line 162, in _solve return await task File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot/utils.py", line 114, in _wrapper result = await loop.run_in_executor(None, pfunc) File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot_plugin_pixivbot/protocol_dep/post_dest.py", line 80, in post_destination return context.require(PostDestinationFactoryManager).from_event(bot, event) File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot_plugin_pixivbot/protocol_dep/post_dest.py", line 76, in from_event return self[get_adapter_name(bot)].from_event(bot, event) File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot_plugin_pixivbot/protocol_dep/protocol_dep.py", line 33, in getitem return self.require(adapter) File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot_plugin_pixivbot/protocol_dep/protocol_dep.py", line 29, in require raise RuntimeError(f"暂不支持{adapter}") RuntimeError: 暂不支持oneadapter
01-13 00:53:25 [SUCCESS] nonebot | OneBot V11 3276928870 | [message.group.normal]: Message 275508025 from xx@[群:xx] "看看图 233"
01-13 00:53:25 [ERROR] nonebot_plugin_pixivbot | error <class 'ConnectionResetError'> raised by agen (IMAGE illust_id=233, page=0)
01-13 00:53:25 [WARNING] nonebot_plugin_pixivbot | ConnectionResetError
01-16 18:41:11 [ERROR] nonebot | Failed to import "nonebot-plugin-pixivbot"
Traceback (most recent call last):
File "bot.py", line 27, in <module>
nonebot.load_from_toml("pyproject.toml")
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/__init__.py", line 1089, in load_from_toml
return load_all_plugins(set(plugins), set(plugin_dirs))
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/__init__.py", line 1031, in load_all_plugins
result = context.run(_load_plugin, manager, plugin_name)
> File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/__init__.py", line 953, in _load_plugin
module = manager.load_plugin(plugin_name)
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/manager.py", line 161, in load_plugin
return importlib.import_module(f"{self.namespace}.{name}")
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/manager.py", line 267, in exec_module
super().exec_module(module)
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/root/Nonebot/src/plugins/nonebot-plugin-pixivbot/__init__.py", line 9, in <module>
from . import common_command
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/manager.py", line 267, in exec_module
super().exec_module(module)
File "/root/Nonebot/src/plugins/nonebot-plugin-pixivbot/common_command.py", line 11, in <module>
from .distributor import distributor
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/manager.py", line 267, in exec_module
super().exec_module(module)
File "/root/Nonebot/src/plugins/nonebot-plugin-pixivbot/distributor.py", line 15, in <module>
from .data_source import PixivDataSource, pixiv_data_source, pixiv_bindings
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/manager.py", line 267, in exec_module
super().exec_module(module)
File "/root/Nonebot/src/plugins/nonebot-plugin-pixivbot/data_source/__init__.py", line 1, in <module>
from .pixiv_data_source import PixivDataSource, pixiv_data_source
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin/manager.py", line 267, in exec_module
super().exec_module(module)
File "/root/Nonebot/src/plugins/nonebot-plugin-pixivbot/data_source/pixiv_data_source.py", line 394
@get_driver().on_startup
^
SyntaxError: invalid syntax
环境Docker+Debian+Python3
大佬您好,我这边出现了点问题。。。我在其他群使用pixivbot的指令都没有问题,只在某个特定的群里面使用 来张图 指令时日志会出现以上报错,该群唯一的不同之处可能在于这个新建的bot在使用过一次指令前前我先用ac limit对这个群聊的pixivbot使用次数进行了限制。
另外,如果我在该群使用pixivbot help指令的话,会提示:
内部错误:<class 'sqlalchemy.exc.MissingGreenlet'>greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)。
这点同样是只有在该群会出现的错误。
最后就是,我想尝试清理一下缓存,于是使用了invaildate_cache。但是又会显示:
内部错误:<class 'TypeError'>object bool can't be used in 'await' expression
如果大佬有空的话能麻烦大佬指点一下吗?非常感谢
如题,refresh_token就是在服务器上用gppt获取的,应该不是网络问题
log:
Traceback (most recent call last):
File "/home/ubuntu/Bot/MizukiBot-Lazer/bot.py", line 36, in
nonebot.load_from_toml("pyproject.toml")
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot/plugin/load.py", line 125, in load_from_toml
return load_all_plugins(plugins, plugin_dirs)
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot/plugin/load.py", line 62, in load_all_plugins
return manager.load_all_plugins()
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 175, in load_all_plugins
return set(
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 176, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 141, in load_plugin
module = importlib.import_module(name)
File "/usr/lib/python3.10/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 "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 240, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot_plugin_pixivbot/init.py", line 10, in
from .handler.command.help import help_text
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/init.py", line 1, in
from . import command
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/command/init.py", line 1, in
from .bind import BindHandler, UnbindHandler
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/command/bind.py", line 4, in
from nonebot_plugin_pixivbot.service.pixiv_account_binder import PixivAccountBinder
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot_plugin_pixivbot/service/init.py", line 1, in
from . import scheduler
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot_plugin_pixivbot/service/scheduler.py", line 12, in
from nonebot_plugin_pixivbot.data.subscription import SubscriptionRepo
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot_plugin_pixivbot/data/init.py", line 5, in
conf = context.require(Config)
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot_plugin_pixivbot/context.py", line 136, in require
return self._find_provider(key).provide()
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot_plugin_pixivbot/context.py", line 46, in provide
self._cache = self._func() # just let it throw
File "/home/ubuntu/.pyenv/versions/MizukiBot-Lazer/lib/python3.10/site-packages/nonebot_plugin_pixivbot/context.py", line 90, in
self.register_lazy(cls, lambda: cls(*args, **kwargs))
File "pydantic/env_settings.py", line 39, in pydantic.env_settings.BaseSettings.init
super().init(
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.init
raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for Config
pixiv_query_expires_in
value is not a valid integer (type=type_error.integer)
如题,群内订阅了一些画师,但是从来没有收到过一次推送。
私聊的关注推送和群组的日榜定时推送都是正常工作的。
研究发现,pixivbot如果没有获取过此用户的图片,使用ID获取这个user总是返回user_id not found的错误。
以ATDAN-(6662895)为例:
但是以ID搜图可以工作:
此时再执行/pixivbot watch fetch,居然又可以了?
再换一个画师Pottsness(59336265),群内无搜图历史也无订阅历史(但是有私聊关注者推送)
(ErrorLog太长,screen不能滚屏)
但是第一次使用名称搜图之后,基于ID的功能就都正常了:
总之就是这样,看样子跟数据库有点关系。(使用的是默认的SQLite)
另一个问题是,大群里群友一拥而上发图的时候经常会遇到Database Locked错误。
这样R18色图就能过审了🤤
01-06 18:43:56 [SUCCESS] nonebot | OneBot V11 3429318375 | [message.group.normal]: Message -1637898823 from 415662910@[群:783759481] "来张图"
01-06 18:43:56 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_pixivbot.handler.common.random_recommended_illust)
01-06 18:43:56 [INFO] nonebot_plugin_pixivbot | [mediator] recommended_illusts cache_strategy=NORMAL
01-06 18:43:56 [INFO] nonebot_plugin_pixivbot | [pixiv_service] choice [98288870]
01-06 18:43:56 [INFO] nonebot_plugin_pixivbot | [mediator] image 98288870 cache_strategy=NORMAL
01-06 18:43:56 [INFO] nonebot_plugin_pixivbot | [local] image 98288870
01-06 18:43:56 [INFO] nonebot_plugin_pixivbot | [mediator] no cache or cache expired
01-06 18:43:56 [INFO] nonebot_plugin_pixivbot | [remote] image 98288870
01-06 18:44:06 [ERROR] nonebot_plugin_pixivbot | error <class 'asyncio.exceptions.TimeoutError'> raised by agen (IMAGE illust_id=98288870)
如题,经常会出现如上错误,不清楚是哪一部分出了问题但是总之它经常这样然后报“网络错误”,代理应当是正常运作的因为还是经常能发出来的,但是出现以上错误就比较尴尬
py:3.10.8
OS:Debian x64
nb-cli 1.0.4
nonebot-adapter-onebot 2.2.1
nonebot-plugin-access-control 0.2.3
nonebot-plugin-apscheduler 0.2.0
nonebot-plugin-datastore 0.4.0
nonebot-plugin-localstore 0.2.0
nonebot-plugin-pixivbot 1.7.0.post2
nonebot2 2.0.0rc3
配置文件:
DRIVER=~fastapi
HOST=127.0.0.1
PORT=8082
LOG_LEVEL=INFO
NICKNAME=["Alice"]
SUPERUSER=["123456789"]
COMMAND_START=["/", ""]
#nonebot-plugin-pixivbot
pixiv_refresh_token=*****************
pixiv_block_tags=["NovelAI"]
pixiv_block_action=completely_block
pixiv_query_cooldown=10
pixiv_max_item_per_query=5
#nonebot-plugin-access-control
ACCESS_CONTROL_AUTO_PATCH_ENABLED=true
已安装的只有nonebot-plugin-pixivbot和nonebot-plugin-access-control
在私聊和群聊中使用ac
或/ac
指令均无任何反应,无法控制R-18
不管是”来3张图“还是”来5张图“或者是下面日志里的”来2张图“,都会报这个错,但仅仅是”来张图“不会报错
以下是日志
[2023-02-10 15:48:50] 02-10 15:48:49 [SUCCESS] nonebot | OneBot V11 1234567890 | [message.private.friend]: Message 305350647 from 123456789 '来2张图'
[2023-02-10 15:48:50] 02-10 15:48:49 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_pixivbot.handler.common.random_recommended_illust)
[2023-02-10 15:48:50] 02-10 15:48:49 [INFO] nonebot_plugin_pixivbot | [mediator] recommended_illusts cache_strategy=NORMAL
[2023-02-10 15:48:50] 02-10 15:48:49 [INFO] nonebot_plugin_pixivbot | [local] recommended_illusts
[2023-02-10 15:48:50] 02-10 15:48:49 [INFO] nonebot_plugin_pixivbot | [pixiv_service] choice [95841125, 80168605]
[2023-02-10 15:48:50] 02-10 15:48:49 [INFO] nonebot_plugin_pixivbot | [local] got 1000 illusts, illust_detail of 0 are missed
[2023-02-10 15:48:50] 02-10 15:48:49 [INFO] nonebot_plugin_pixivbot | [mediator] image 95841125[0] cache_strategy=NORMAL
[2023-02-10 15:48:50] 02-10 15:48:49 [INFO] nonebot_plugin_pixivbot | [local] image 95841125
[2023-02-10 15:48:50] 02-10 15:48:49 [INFO] nonebot_plugin_pixivbot | [mediator] image 80168605[0] cache_strategy=NORMAL
[2023-02-10 15:48:50] 02-10 15:48:49 [INFO] nonebot_plugin_pixivbot | [local] image 80168605
[2023-02-10 15:48:50] 02-10 15:48:49 [INFO] nonebot_plugin_pixivbot | [mediator] no cache or cache expired
[2023-02-10 15:48:50] 02-10 15:48:49 [INFO] nonebot_plugin_pixivbot | [remote] image 95841125
[2023-02-10 15:48:50] 02-10 15:48:49 [INFO] nonebot_plugin_pixivbot | [mediator] no cache or cache expired
[2023-02-10 15:48:50] 02-10 15:48:49 [INFO] nonebot_plugin_pixivbot | [remote] image 80168605
[2023-02-10 15:48:51] 02-10 15:48:50 [INFO] nonebot_plugin_pixivbot | [local] update image 80168605 (update_time=2023-02-10 07:48:50.967331+00:00)
[2023-02-10 15:48:52] 02-10 15:48:51 [INFO] nonebot_plugin_pixivbot | [local] update image 95841125 (update_time=2023-02-10 07:48:51.512486+00:00)
[2023-02-10 15:48:52] 02-10 15:48:51 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_pixivbot.handler.common.random_recommended_illust) running complete
[2023-02-10 15:48:52] 02-10 15:48:51 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_pixivbot.handler.common.random_recommended_illust) failed.
[2023-02-10 15:48:52] Traceback (most recent call last):
[2023-02-10 15:48:52] File "<string>", line 15, in <module>
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot/__init__.py", line 273, in run
[2023-02-10 15:48:52] get_driver().run(*args, **kwargs)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot/drivers/fastapi.py", line 187, in run
[2023-02-10 15:48:52] uvicorn.run(
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/uvicorn/main.py", line 569, in run
[2023-02-10 15:48:52] server.run()
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/uvicorn/server.py", line 60, in run
[2023-02-10 15:48:52] return asyncio.run(self.serve(sockets=sockets))
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/3.10.8/lib/python3.10/asyncio/runners.py", line 44, in run
[2023-02-10 15:48:52] return loop.run_until_complete(main)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot/message.py", line 141, in _check_matcher
[2023-02-10 15:48:52] await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
[2023-02-10 15:48:52] > File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot/message.py", line 187, in _run_matcher
[2023-02-10 15:48:52] await matcher.run(bot, event, state, stack, dependency_cache)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 732, in run
[2023-02-10 15:48:52] await self.simple_run(bot, event, state, stack, dependency_cache)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 707, in simple_run
[2023-02-10 15:48:52] await handler(
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot/dependencies/__init__.py", line 108, in __call__
[2023-02-10 15:48:52] return await cast(Callable[..., Awaitable[R]], self.call)(**values)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/common/random_recommended_illust.py", line 37, in on_match
[2023-02-10 15:48:52] await self.handle(count=get_count(state), post_dest=post_dest)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/base.py", line 99, in handle
[2023-02-10 15:48:52] await self.interceptor.intercept(self._parse_args_and_actual_handle, *args,
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/interceptor/combined_interceptor.py", line 45, in intercept
[2023-02-10 15:48:52] await self.x.intercept(
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/interceptor/combined_interceptor.py", line 45, in intercept
[2023-02-10 15:48:52] await self.x.intercept(
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/interceptor/combined_interceptor.py", line 45, in intercept
[2023-02-10 15:48:52] await self.x.intercept(
[2023-02-10 15:48:52] [Previous line repeated 3 more times]
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/interceptor/default_error_interceptor.py", line 32, in intercept
[2023-02-10 15:48:52] raise e
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/interceptor/default_error_interceptor.py", line 22, in intercept
[2023-02-10 15:48:52] await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/interceptor/permission_interceptor.py", line 34, in intercept
[2023-02-10 15:48:52] await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/interceptor/permission_interceptor.py", line 34, in intercept
[2023-02-10 15:48:52] await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/interceptor/timeout_interceptor.py", line 21, in intercept
[2023-02-10 15:48:52] await wait_for(wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs),
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/3.10.8/lib/python3.10/asyncio/tasks.py", line 445, in wait_for
[2023-02-10 15:48:52] return fut.result()
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/interceptor/loading_prompt_interceptor.py", line 33, in intercept
[2023-02-10 15:48:52] await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/interceptor/record_req_interceptor.py", line 20, in intercept
[2023-02-10 15:48:52] await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/interceptor/permission_interceptor.py", line 34, in intercept
[2023-02-10 15:48:52] await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/base.py", line 130, in _parse_args_and_actual_handle
[2023-02-10 15:48:52] await self.actual_handle(post_dest=post_dest, silently=silently, **kwargs)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/common/random_recommended_illust.py", line 49, in actual_handle
[2023-02-10 15:48:52] await self.post_illusts(illusts,
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/base.py", line 70, in post_illusts
[2023-02-10 15:48:52] await self.postman_manager.send_illusts(model, post_dest=post_dest)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/handler/recorder.py", line 101, in send_illusts
[2023-02-10 15:48:52] await self.delegation.send_illusts(model, post_dest=post_dest)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot/protocol_dep/postman.py", line 40, in send_illusts
[2023-02-10 15:48:52] return await self[post_dest.adapter].send_illusts(model, post_dest=post_dest)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot_onebot_v11/protocol_dep/postman.py", line 84, in send_illusts
[2023-02-10 15:48:52] await post_dest.post(messages)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot_onebot_v11/protocol_dep/post_dest.py", line 49, in post
[2023-02-10 15:48:52] await self.post_multiple(message)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot_plugin_pixivbot_onebot_v11/protocol_dep/post_dest.py", line 89, in post_multiple
[2023-02-10 15:48:52] await self.bot.send_private_forward_msg(
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot/internal/adapter/bot.py", line 120, in call_api
[2023-02-10 15:48:52] raise exception
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot/internal/adapter/bot.py", line 98, in call_api
[2023-02-10 15:48:52] result = await self.adapter._call_api(self, api, **data)
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot/adapters/onebot/v11/adapter.py", line 132, in _call_api
[2023-02-10 15:48:52] return handle_api_result(await self._result_store.fetch(seq, timeout))
[2023-02-10 15:48:52] File "/home/snowmoonss/.pyenv/versions/pixivbot/lib/python3.10/site-packages/nonebot/adapters/onebot/v11/utils.py", line 58, in handle_api_result
[2023-02-10 15:48:52] raise ActionFailed(**result)
[2023-02-10 15:48:52] nonebot.adapters.onebot.v11.exception.ActionFailed: ActionFailed(status='failed', retcode=103, data=None, echo='2')
##报错如下
########
12-24 08:13:23 [SUCCESS] nonebot | OneBot V11 2715252422 | [message.group.normal]: Message 245639597 from 77139032@[群:7
37521032] "看看榜"
12-24 08:13:23 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_pixivbot.handler.
common.ranking)
12-24 08:13:23 [INFO] nonebot_plugin_pixivbot | [mediator] illust_ranking day cache_strategy=NORMAL
12-24 08:13:24 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_pixivbot.handler.common.ranking) running c
omplete
12-24 08:13:24 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_pixivbot.handler.common.ranking)
failed.
Traceback (most recent call last):
File "C:\Users\Administrator\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\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\Scripts\nb.exe_main.py", line 7, in
sys.exit(main())
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in _
call
return self.main(*args, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1055, in m
ain
rv = self.invoke(ctx)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1657, in i
nvoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1404, in i
nvoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in in
voke
return callback(*args, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nb_cli\commands\main.py", line
30, in run
run_bot(file, app)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nb_cli\handlers\deploy.py", lin
e 25, in run_bot
nonebot.run(app=f"{module_name}:{app}")
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_init.py", line 273,
in run
get_driver().run(*args, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\drivers\fastapi.py", li
ne 172, in run
uvicorn.run(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn\main.py", line 569, in
run
server.run()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn\server.py", line 60, 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_unt
il_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_for
ever
self._run_once()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1899, in _run_o
nce
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 "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\message.py", line 142,
in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\message.py", line 188,
in run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\internal\matcher\matche
r.py", line 727, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\internal\matcher\matche
r.py", line 702, in simple_run
await handler(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\dependencies_init.p
y", line 108, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler
\common\ranking.py", line 58, in on_match
await self.handle(mode, num, post_dest=post_dest)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler
\base.py", line 80, in handle
await self.interceptor.intercept(self._parse_args_and_actual_handle, *args,
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler
\interceptor\combined_interceptor.py", line 45, in intercept
await self.x.intercept(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler
\interceptor\combined_interceptor.py", line 45, in intercept
await self.x.intercept(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler
\interceptor\combined_interceptor.py", line 45, in intercept
await self.x.intercept(
[Previous line repeated 2 more times]
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler
\interceptor\default_error_interceptor.py", line 36, in intercept
raise e # 重新抛出,让上层可以处理(如scheduler中需要处理Handler的异常)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler
\interceptor\default_error_interceptor.py", line 22, in intercept
await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler
\interceptor\permission_interceptor.py", line 34, in intercept
await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler
\interceptor\permission_interceptor.py", line 34, in intercept
await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler
\interceptor\timeout_interceptor.py", line 21, in intercept
await wait_for(wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs),
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 445, in wait_for
return fut.result()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler
\interceptor\loading_prompt_interceptor.py", line 33, in intercept
await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler
\interceptor\permission_interceptor.py", line 34, in intercept
await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler
\base.py", line 111, in _parse_args_and_actual_handle
await self.actual_handle(post_dest=post_dest, silently=silently, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler
\common\ranking.py", line 115, in actual_handle
illusts = await self.service.illust_ranking(mode, range)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\service
\pixiv_service.py", line 40, in illust_ranking
async for x in self.repo.illust_ranking(mode):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\data\pi
xiv_repo\mediator_repo.py", line 368, in illust_ranking
async with self._shared_agen_mgr.get(SharedAgenIdentifier(PixivResType.ILLUST_RANKING, mode=mode),
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 199, in aenter
return await anext(self.gen)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\utils\s
hared_agen.py", line 193, in get
origin = self.agen(identifier, cache_strategy, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\data\pi
xiv_repo\mediator_repo.py", line 177, in agen
return self.factories[identifier.type](self, cache_strategy=cache_strategy, **merged_kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\data\pi
xiv_repo\mediator_repo.py", line 140, in illust_ranking_factory
cache_factory=self.local.illust_ranking,
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\context
.py", line 16, in get
return context.require(self._key)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\context
.py", line 136, in require
return self._find_provider(key).provide()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\context
.py", line 46, in provide
self._cache = self._func() # just let it throw
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\context
.py", line 90, in
self.register_lazy(cls, lambda: cls(*args, **kwargs))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\data\pi
xiv_repo\local_repo\sql.py", line 53, in init
self.apscheduler.add_job,
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\context
.py", line 16, in get
return context.require(self._key)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\context
.py", line 136, in require
return self._find_provider(key).provide()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\context
.py", line 144, in _find_provider
raise KeyError(key)
KeyError: <class 'apscheduler.schedulers.asyncio.AsyncIOScheduler'>
##########
配置如下
##########
内部错误:<class 'pixivpy_async.error.NoTokenError'>No access_token Found!
怎么解决啊
请教大佬这是什么原因
配置我就配置了refresh_tokne和代理
pixiv_refresh_token="xxxxx"
pixiv_proxy="http://127.0.0.1:xxx"
我也想顺便问一下这样子格式对了
万分感谢!
Traceback (most recent call last):
File "C:\Users\26682\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\26682\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\Scripts\nb.exe_main.py", line 7, in
sys.exit(main())
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke
return _callback(*args, **kwargs)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\nb_cli\commands\main.py", line 30, in run
run_bot(file, app)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\nb_cli\handlers\deploy.py", line 25, in run_bot
nonebot.run(app=f"{module_name}:{app}")
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_init.py", line 261, in run
get_driver().run(*args, **kwargs)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\drivers\fastapi.py", line 170, in run
uvicorn.run(
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn\main.py", line 576, in run
server.run()
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn\server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 633, in run_until_complete
self.run_forever()
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 600, in run_forever
self._run_once()
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1896, in _run_once
handle._run()
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\message.py", line 146, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\message.py", line 196, in run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\internal\matcher.py", line 672, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\internal\matcher.py", line 639, in simple_run
await handler(
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\dependencies_init.py", line 92, in call
return await self.call(**values)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\query\ranking.py", line 30, in on_match
await self.handler.handle(mode, num, post_dest=get_post_dest(bot, event))
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\query\utils.py", line 42, in get_post_dest
return context.require(PostDestinationFactoryManager).from_event(bot, event)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\protocol_dep\post_dest.py", line 63, in from_event
return self[get_adapter_name(bot)].from_event(bot, event)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\protocol_dep\protocol_dep.py", line 31, in getitem
return self.require(adapter)
File "C:\Users\26682\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\protocol_dep\protocol_dep.py", line 28, in require
return context.require(self.factories[adapter])
KeyError: 'onebot'
虽然确实听起来很傻但是因为QQ让p站红了导致发链接看的很心慌,也不知道QQ有没有什么检测机制
希望增加功能:
1、因为部分画师名字输入比较麻烦,如果可以兼容uid搜索就好了;
2、最近ai榜质量挺好的,希望可以添加看看AI榜。
群内有时候不方便,希望有类似黑白名单的r18筛选功能
就像自主规制一样,把图片替换成提示,附上图片信息,只是把自主规制的提示换成被服务器拦截?(
插件使用时出现异常(首次运行),请问可能是哪方面的问题呢?
nonebot2运行于阿里云2核2G上,系统镜像为ubuntu_18_04_x64_20G_alibase_20210420
python环境为 3.9.9 (main, Jan 11 2023, 13:36:57) [GCC 7.5.0] on linux
代理使用clash,插件配置中使用socket5连接
http代理也试过,同样报错。测试代理下可以curl通pixiv
插件通过nbcli安装,plugins = ["nonebot_plugin_access_control", "nonebot_plugin_pixivbot"]
测试来张图功能的时候出现了内部错误
内部错误:<class 'sqlalchemy.exc.OperationalError'>(sqlite3.OperationalError) near "ON": syntax error
[SQL: INSERT INTO illust_set_cache_illust (cache_id, illust_id, rank) VALUES (?, ?, ?) ON CONFLICT (cache_id, illust_id) DO NOTHING]
[parameters: (1, 85338970, 0)]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
后台日志如下(pm2)
3|bot_test | 02-24 16:39:12 [SUCCESS] nonebot_plugin_pixivbot | refresh access token successfully. new token expires in 3600 seconds.
3|bot_test | 02-24 16:39:25 [SUCCESS] nonebot | OneBot V11 ********** | [message.private.friend]: Message 113049793 from ********* "来张图"
3|bot_test | 02-24 16:39:25 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_pixivbot.handler.common.random_recommended_illust)
3|bot_test | 02-24 16:39:25 [INFO] nonebot_plugin_pixivbot | [mediator] recommended_illusts cache_strategy=NORMAL
3|bot_test | 02-24 16:39:25 [INFO] nonebot_plugin_pixivbot | [local] recommended_illusts
3|bot_test | 02-24 16:39:25 [INFO] nonebot_plugin_pixivbot | [mediator] no cache
3|bot_test | 02-24 16:39:25 [INFO] nonebot_plugin_pixivbot | [remote] recommended_illusts
3|bot_test | 02-24 16:39:29 [INFO] nonebot_plugin_pixivbot | [local] append recommended_illusts (89 items) (update_time=2023-02-24 08:39:29.467578+00:00, pages=1, next_qs={'content_type': 'illust', 'filter': 'for_ios', 'include_ranking_label': 'true', 'min_bookmark_id_for_recent_illust': '19409055318', 'max_bookmark_id_for_recommend': '19292895144', 'offset': '0', 'include_ranking_illusts': 'false', 'include_privacy_policy': 'false', 'viewed': ['74902982', '103070297', '105565310', '77202252', '93287605', '90724362', '95927502', '93508362', '75691856', '98214912', '75426467', '78253736', '93355299', '98366214', '97972911', '74641348', '104564463', '105353565', '79895186', '99827857', '87740032', '25950227', '100214821', '87543808', '74670640', '95725261', '54330336', '95210012', '105538757', '96352877', '58099279', '75148244', '97736256', '65456653', '73424709', '87135864', '85742450', '96777964', '74938719', '105503743', '95913659', '77042494', '104058515', '105469182', '73372039', '76101179', '90896936', '43796605', '105555300', '86849255', '95370037', '95625131', '97086274', '74072598', '81300641', '85852984', '105151086', '86920942', '72939532', '86930658', '87135347', '89416175', '77629434', '100441318', '87011701', '94795485', '79919240', '77888645', '74636713', '87040731', '102677874', '79917459', '69630731', '86113095', '87200529', '74603343', '88405884', '90496169', '76591462', '94432761', '96433029', '82542737', '98508889', '77980028', '71249092', '76200564', '77048512', '86529151', '90392959']})
3|bot_test | 02-24 16:39:29 [ERROR] nonebot_plugin_pixivbot | error <class 'sqlalchemy.exc.OperationalError'> raised by agen (RECOMMENDED_ILLUSTS )
3|bot_test | 02-24 16:39:29 [INFO] nonebot_plugin_pixivbot | [remote] got 89 illusts, illust_detail of 0 are missed
3|bot_test | 02-24 16:39:29 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_pixivbot.handler.common.random_recommended_illust) running complete
3|bot_test | 02-24 16:39:29 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_pixivbot.handler.common.random_recommended_illust) failed.
3|bot_test | Traceback (most recent call last):
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
3|bot_test | self.dialect.do_execute(
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
3|bot_test | cursor.execute(statement, parameters)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 100, in execute
3|bot_test | self._adapt_connection._handle_exception(error)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 228, in _handle_exception
3|bot_test | raise error
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 82, in execute
3|bot_test | self.await_(_cursor.execute(operation, parameters))
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 68, in await_only
3|bot_test | return current.driver.switch(awaitable)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 121, in greenlet_spawn
3|bot_test | value = await result
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/aiosqlite/cursor.py", line 37, in execute
3|bot_test | await self._execute(self._cursor.execute, sql, parameters)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/aiosqlite/cursor.py", line 31, in _execute
3|bot_test | return await self._conn._execute(fn, *args, **kwargs)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/aiosqlite/core.py", line 129, in _execute
3|bot_test | return await future
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/aiosqlite/core.py", line 102, in run
3|bot_test | result = function()
3|bot_test | sqlite3.OperationalError: near "ON": syntax error
3|bot_test | The above exception was the direct cause of the following exception:
3|bot_test | Traceback (most recent call last):
3|bot_test | File "/usr/local/python3/bin/nb", line 8, in <module>
3|bot_test | sys.exit(main())
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
3|bot_test | return self.main(*args, **kwargs)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/click/core.py", line 1055, in main
3|bot_test | rv = self.invoke(ctx)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
3|bot_test | return _process_result(sub_ctx.command.invoke(sub_ctx))
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
3|bot_test | return ctx.invoke(self.callback, **ctx.params)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/click/core.py", line 760, in invoke
3|bot_test | return __callback(*args, **kwargs)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nb_cli/commands/main.py", line 30, in run
3|bot_test | run_bot(file, app)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nb_cli/handlers/deploy.py", line 25, in run_bot
3|bot_test | nonebot.run(app=f"{module_name}:{app}")
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot/__init__.py", line 273, in run
3|bot_test | get_driver().run(*args, **kwargs)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot/drivers/fastapi.py", line 187, in run
3|bot_test | uvicorn.run(
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/uvicorn/main.py", line 569, in run
3|bot_test | server.run()
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/uvicorn/server.py", line 60, in run
3|bot_test | return asyncio.run(self.serve(sockets=sockets))
3|bot_test | File "/usr/local/python3/lib/python3.9/asyncio/runners.py", line 44, in run
3|bot_test | return loop.run_until_complete(main)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot/message.py", line 141, in _check_matcher
3|bot_test | await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
3|bot_test | > File "/usr/local/python3/lib/python3.9/site-packages/nonebot/message.py", line 187, in _run_matcher
3|bot_test | await matcher.run(bot, event, state, stack, dependency_cache)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot/internal/matcher/matcher.py", line 732, in run
3|bot_test | await self.simple_run(bot, event, state, stack, dependency_cache)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot/internal/matcher/matcher.py", line 707, in simple_run
3|bot_test | await handler(
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot/dependencies/__init__.py", line 108, in __call__
3|bot_test | return await cast(Callable[..., Awaitable[R]], self.call)(**values)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/common/random_recommended_illust.py", line 38, in on_match
3|bot_test | await self.handle(count=get_count(state), post_dest=post_dest)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/base.py", line 96, in handle
3|bot_test | await self.interceptor.intercept(self._parse_args_and_actual_handle, *args,
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/interceptor/combined_interceptor.py", line 56, in intercept
3|bot_test | await self.x.intercept(
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/interceptor/combined_interceptor.py", line 56, in intercept
3|bot_test | await self.x.intercept(
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/interceptor/combined_interceptor.py", line 56, in intercept
3|bot_test | await self.x.intercept(
3|bot_test | [Previous line repeated 4 more times]
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/interceptor/default_error_interceptor.py", line 36, in intercept
3|bot_test | raise e # 重新抛出,让上层可以处理(如scheduler中需要处理Handler的异常)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/interceptor/default_error_interceptor.py", line 22, in intercept
3|bot_test | await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/interceptor/permission_interceptor.py", line 34, in intercept
3|bot_test | await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/interceptor/permission_interceptor.py", line 34, in intercept
3|bot_test | await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/interceptor/timeout_interceptor.py", line 21, in intercept
3|bot_test | await wait_for(wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs),
3|bot_test | File "/usr/local/python3/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
3|bot_test | return fut.result()
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/interceptor/retry_interceptor.py", line 32, in intercept
3|bot_test | raise e
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/interceptor/retry_interceptor.py", line 26, in intercept
3|bot_test | return await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/interceptor/loading_prompt_interceptor.py", line 33, in intercept
3|bot_test | await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/interceptor/service_interceptor.py", line 35, in intercept
3|bot_test | await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/interceptor/record_req_interceptor.py", line 20, in intercept
3|bot_test | await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/base.py", line 127, in _parse_args_and_actual_handle
3|bot_test | await self.actual_handle(post_dest=post_dest, silently=silently, **kwargs)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/handler/common/random_recommended_illust.py", line 48, in actual_handle
3|bot_test | illusts = await self.service.random_recommended_illust(count=count,
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/service/pixiv_service.py", line 112, in random_recommended_illust
3|bot_test | illusts = [x async for x in self.repo.recommended_illusts()]
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/service/pixiv_service.py", line 112, in <listcomp>
3|bot_test | illusts = [x async for x in self.repo.recommended_illusts()]
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/data/pixiv_repo/mediator_repo.py", line 348, in recommended_illusts
3|bot_test | async for x in gen:
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/utils/shared_agen.py", line 63, in _generator
3|bot_test | raise e
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/utils/shared_agen.py", line 55, in _generator
3|bot_test | new_data = await self._origin.__anext__()
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/data/pixiv_repo/mediator.py", line 131, in mediate_many
3|bot_test | async for x in _load_many_from_remote_and_append(remote_factory, query_kwargs,
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/data/pixiv_repo/mediator.py", line 97, in _load_many_from_remote_and_append
3|bot_test | await cache_appender(buffer, item)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/data/pixiv_repo/local_repo/sql.py", line 512, in append_recommended_illusts
3|bot_test | return await self._append_and_check_illusts(session, "other", {"type": "recommended_illusts"},
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/nonebot_plugin_pixivbot/data/pixiv_repo/local_repo/sql.py", line 153, in _append_and_check_illusts
3|bot_test | row_count += (await session.execute(stmt)).rowcount
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/ext/asyncio/session.py", line 215, in execute
3|bot_test | result = await greenlet_spawn(
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 126, in greenlet_spawn
3|bot_test | result = context.throw(*sys.exc_info())
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1712, in execute
3|bot_test | result = conn._execute_20(statement, params or {}, execution_options)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20
3|bot_test | return meth(self, args_10style, kwargs_10style, execution_options)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 333, in _execute_on_connection
3|bot_test | return connection._execute_clauseelement(
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement
3|bot_test | ret = self._execute_context(
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1943, in _execute_context
3|bot_test | self._handle_dbapi_exception(
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception
3|bot_test | util.raise_(
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
3|bot_test | raise exception
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
3|bot_test | self.dialect.do_execute(
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
3|bot_test | cursor.execute(statement, parameters)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 100, in execute
3|bot_test | self._adapt_connection._handle_exception(error)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 228, in _handle_exception
3|bot_test | raise error
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 82, in execute
3|bot_test | self.await_(_cursor.execute(operation, parameters))
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 68, in await_only
3|bot_test | return current.driver.switch(awaitable)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 121, in greenlet_spawn
3|bot_test | value = await result
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/aiosqlite/cursor.py", line 37, in execute
3|bot_test | await self._execute(self._cursor.execute, sql, parameters)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/aiosqlite/cursor.py", line 31, in _execute
3|bot_test | return await self._conn._execute(fn, *args, **kwargs)
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/aiosqlite/core.py", line 129, in _execute
3|bot_test | return await future
3|bot_test | File "/usr/local/python3/lib/python3.9/site-packages/aiosqlite/core.py", line 102, in run
3|bot_test | result = function()
3|bot_test | sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) near "ON": syntax error
3|bot_test | [SQL: INSERT INTO illust_set_cache_illust (cache_id, illust_id, rank) VALUES (?, ?, ?) ON CONFLICT (cache_id, illust_id) DO NOTHING]
3|bot_test | [parameters: (1, 74902982, 0)]
3|bot_test | (Background on this error at: https://sqlalche.me/e/14/e3q8)
Preparing metadata (setup.py) ... done
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/be/54/5468f25bcadc6877de0bfd253f27e3ce489c3d4489c928cdb38b31ed47cb/greenlet-0.3.1.tar.gz (39 kB)
Preparing metadata (setup.py) ... done
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/9f/29/c8d0b051afacd0108c26a89824a13fa041299b61e8d9e50a6a35e25c4ec1/greenlet-0.3.tar.gz (37 kB)
Preparing metadata (setup.py) ... done
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/72/db/0d1a944ba1517256e8b1a080a90297569d8662442631a6b05f8a1c584556/greenlet-0.2.tar.gz (22 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\Rin\AppData\Local\Temp\pip-install-eby1tclc\greenlet_a0051fbe720c459da3277333517494c5\setup.py", line 3, in
import ez_setup
File "C:\Users\Rin\AppData\Local\Temp\pip-install-eby1tclc\greenlet_a0051fbe720c459da3277333517494c5\ez_setup_init_.py", line 98
except pkg_resources.VersionConflict, e:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
环境:win
python3.10.8
希望加一个自动撤回的功能,
还有就是希望bot发送合并消息的时候发送者为发出指令的人
例如A发送了指令,bot响应之后发送了一个合并消息,合并消息中的发送人是A
内部错误:<class 'aiohttp.client_exceptions.ClientConnectorError'>Cannot connect to host none:443 ssl:default [getaddrinfo failed]
如果加了http代理,在代理日志也提示accept //none:443 [proxy]
报错如下
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host none:443
ssl:default [getaddrinfo failed]
不知道如何处理系统是windows2012server r2
内部错误:<class 'pixivpy_async.error.NoTokenError'>No access_token Found!
我这边用的zhenxun跑的,因为没有.env.prod,我把token补到.env.dev里了,但是没用。
新建了个.env.prod,写入了,但是也读不到。希望能告诉我一下入口在哪里,我直接填进去。
------------------------------------------------详细报错---------------------------------------------------
`03-13 00:32:30 [INFO] nonebot_plugin_pixivbot | [mediator] user_bookmarks 20017078 cache_strategy=NORMAL
03-13 00:32:30 [INFO] nonebot_plugin_pixivbot | [local] user_bookmarks 20017078
03-13 00:32:30 [INFO] nonebot_plugin_pixivbot | [mediator] no cache
03-13 00:32:30 [INFO] nonebot_plugin_pixivbot | [remote] user_bookmarks 20017078
03-13 00:32:30 [INFO] nonebot_plugin_pixivbot | [remote] got 0 illusts, illust_detail of 0 are missed
03-13 00:32:30 [ERROR] nonebot_plugin_pixivbot | error <class 'pixivpy_async.error.NoTokenError'> raised by agen (USER_BOOKMARKS user_id=20017078)
03-13 00:32:31 [SUCCESS] nonebot | OneBot V11 2712395970 | [message.group.normal]: Message 1179271396 from 972127577@[群:636925153] '[image:file=5f155272ca2c3094afaf7254e276cfda.image, subType=0, url=https://gchat.qpic.cn/gchatpic_new/972127577/636925153-2565612720-5...]'
03-13 00:32:31 [INFO] nonebot | Event will be handled by Matcher(type='message', module=plugins.mute)
03-13 00:32:31 [INFO] nonebot | Event will be handled by Matcher(type='message', module=plugins.black_word)
03-13 00:32:31 [INFO] nonebot | Event will be handled by Matcher(type='message', module=plugins.parse_bilibili_json)
03-13 00:32:31 [INFO] nonebot | Event will be handled by Matcher(type='message', module=basic_plugins.chat_history.chat_message)
03-13 00:32:31 [INFO] nonebot | Matcher(type='message', module=plugins.black_word) running complete
03-13 00:32:31 [INFO] nonebot | Matcher(type='message', module=plugins.parse_bilibili_json) running complete
03-13 00:32:31 [INFO] nonebot | Matcher(type='message', module=basic_plugins.chat_history.chat_message) running complete
03-13 00:32:31 [INFO] nonebot | Matcher(type='message', module=plugins.mute) running complete
03-13 00:32:31 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_pixivbot.handler.common.random_bookmark) running complete
03-13 00:32:31 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_pixivbot.handler.common.random_bookmark) failed.
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\data\pixiv_repo\mediator.py", line 164, in mediate_append
async for x in _load_many_from_local_and_remote_and_append(cache_factory, remote_factory, query_kwargs,
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\data\pixiv_repo\mediator.py", line 57, in _load_many_from_local_and_remote_and_append
async for x in cache_factory(**query_kwargs):
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\data\pixiv_repo\local_repo\sql.py", line 473, in user_bookmarks
async for x in self._get_illusts(session, "user_bookmarks", {"user_id": user_id},
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\data\pixiv_repo\local_repo\sql.py", line 71, in _get_illusts
raise NoSuchItemError()
nonebot_plugin_pixivbot.data.pixiv_repo.errors.NoSuchItemError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\zhenxun_bot-main\zhenxun_bot-main\bot.py", line 27, in
nonebot.run()
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_init_.py", line 273, in run
get_driver().run(*args, **kwargs)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot\drivers\fastapi.py", line 187, in run
uvicorn.run(
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\uvicorn\main.py", line 569, in run
server.run()
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\uvicorn\server.py", line 60, 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 628, in run_until_complete
self.run_forever()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 316, in run_forever
super().run_forever()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 595, in run_forever
self._run_once()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1881, 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 "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot\message.py", line 141, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot\message.py", line 187, in run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot\internal\matcher\matcher.py", line 732, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot\internal\matcher\matcher.py", line 707, in simple_run
await handler(
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-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\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\common\random_bookmark.py", line 46, in on_match
await self.handle(count=get_count(state), post_dest=get_post_dest(bot, event))
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\base.py", line 95, in handle
await self.interceptor.intercept(self._parse_args_and_actual_handle, *args,
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\interceptor\combined_interceptor.py", line 56, in intercept
await self.x.intercept(
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\interceptor\combined_interceptor.py", line 56, in intercept
await self.x.intercept(
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\interceptor\combined_interceptor.py", line 56, in intercept
await self.x.intercept(
[Previous line repeated 2 more times]
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\interceptor\default_error_interceptor.py", line 36, in intercept
raise e # 重新抛出,让上层可以处理(如scheduler中需要处理Handler的异常)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\interceptor\default_error_interceptor.py", line 22, in intercept
await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\interceptor\timeout_interceptor.py", line 21, in intercept
await wait_for(wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs),
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 447, in wait_for
return fut.result()
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\interceptor\retry_interceptor.py", line 32, in intercept
raise e
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\interceptor\retry_interceptor.py", line 26, in intercept
return await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\interceptor\loading_prompt_interceptor.py", line 33, in intercept
await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\interceptor\service_interceptor.py", line 35, in intercept
await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\interceptor\record_req_interceptor.py", line 20, in intercept
await wrapped_func(*args, post_dest=post_dest, silently=silently, **kwargs)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\base.py", line 126, in _parse_args_and_actual_handle
await self.actual_handle(post_dest=post_dest, silently=silently, **kwargs)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\handler\common\random_bookmark.py", line 81, in actual_handle
illusts = await self.service.random_bookmark(pixiv_user_id, count=count,
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\service\pixiv_service.py", line 119, in random_bookmark
illusts = [x async for x in self.repo.user_bookmarks(pixiv_user_id)]
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\service\pixiv_service.py", line 119, in
illusts = [x async for x in self.repo.user_bookmarks(pixiv_user_id)]
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\data\pixiv_repo\mediator_repo.py", line 275, in user_bookmarks
async for x in gen:
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\utils\shared_agen.py", line 63, in _generator
raise e
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\utils\shared_agen.py", line 55, in _generator
new_data = await self._origin.anext()
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\data\pixiv_repo\mediator.py", line 169, in mediate_append
async for x in _load_many_from_remote_and_append(remote_factory, query_kwargs,
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\data\pixiv_repo\mediator.py", line 91, in _load_many_from_remote_and_append
async for item in remote_factory(**query_kwargs):
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\data\pixiv_repo\remote_repo.py", line 242, in _get_illusts
async for page, metadata in self._load_many_pages(papi_search_func, "illusts",
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\data\pixiv_repo\remote_repo.py", line 190, in _load_many_pages
page, metadata = await self._load_page(papi_search_func, element_list_name, mapper=mapper,
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\data\pixiv_repo\remote_repo.py", line 156, in _load_page
raw_result = await self.load_raw_page(papi_search_func, **kwargs)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\nonebot_plugin_pixivbot\data\pixiv_repo\remote_repo.py", line 138, in load_raw_page
raw_result = await papi_search_func(**kwargs)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\pixivpy_async\aapi.py", line 217, in user_bookmarks_illust
return await self.requests(method=method, url=url, params=params, auth=req_auth)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-wJE_wHbX-py3.10\lib\site-packages\pixivpy_async\bapi.py", line 48, in requests
raise NoTokenError
pixivpy_async.error.NoTokenError: No access_token Found!`
麻烦帮忙看一下,虽然不解决也没事。
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.