lgc-NB2Dev / YetAnotherPicSearch

Yet another picture search plugin for nonebot2
GNU General Public License v3.0
101 stars 9 forks source link

插件不响应搜图指令 #56

Closed KiDisplayBlueScreen closed 1 year ago

KiDisplayBlueScreen commented 1 year ago

YetAnotherPicSearch 、 go-cqhttp 、 nonebot 、 Python 版本及操作系统

YetAnotherPicSearch 1.7.4 go-cqhttp 1.0..0-rc3 nonebotv2 Python 3.10.4 Windows Server 2016

列出安装的 Python 包

aiodns==3.0.0 aiofiles==0.8.0 aiohttp==3.8.3 aiosignal==1.3.1 anyio==3.6.2 APScheduler==3.9.1.post1 arrow==1.2.3 async-timeout==4.0.2 attrs==22.1.0 binaryornot==0.4.4 Brotli==1.0.9 CacheControl==0.12.11 cachetools==5.2.0 cachy==0.3.0 certifi==2022.5.18.1 cffi==1.15.1 chardet==5.1.0 charset-normalizer==2.0.12 chevron==0.14.0 cleo==0.8.1 click==8.1.3 clikit==0.6.2 colorama==0.4.6 cookiecutter==1.7.3 crashtest==0.3.1 cssselect==1.2.0 diskcache==5.4.0 distlib==0.3.4 fastapi==0.88.0 filelock==3.7.1 frozenlist==1.3.3 greenlet==2.0.1 h11==0.14.0 h2==4.1.0 hpack==4.0.0 html5lib==1.1 httpcore==0.16.2 httptools==0.5.0 httpx==0.23.1 hyperframe==6.0.1 idna==3.3 importlib-metadata==4.11.4 Jinja2==3.1.2 jinja2-time==0.2.0 keyring==23.5.1 lockfile==0.12.2 loguru==0.6.0 lxml==4.9.1 Markdown==3.4.1 MarkupSafe==2.1.1 msgpack==1.0.3 multidict==6.0.3 nb-cli==0.6.8 nonebot-adapter-onebot==2.1.5 nonebot-plugin-apscheduler==0.2.0 nonebot-plugin-chatgpt==0.5.1 nonebot-plugin-gocqhttp==0.6.3 nonebot-plugin-htmlrender==0.2.0.1 nonebot2==2.0.0rc2 OpenAIAuth==0.0.4 packaging==20.9 pastel==0.2.1 pexpect==4.8.0 picimagesearch==3.7.4 pkginfo==1.8.2 platformdirs==2.5.2 playwright==1.28.0 poetry==1.1.13 poetry-core==1.0.8 poyo==0.5.0 prompt-toolkit==3.0.36 psutil==5.9.4 ptyprocess==0.7.0 py-cpuinfo==9.0.0 pycares==4.3.0 pycparser==2.21 pydantic==1.10.2 pyee==9.0.4 pyfiglet==0.8.post1 Pygments==2.13.0 pygtrie==2.5.0 pylev==1.4.0 pymdown-extensions==9.9 pyparsing==3.0.9 pyquery==1.4.3 python-dateutil==2.8.2 python-dotenv==0.21.0 python-markdown-math==0.8 python-slugify==7.0.0 pytz==2022.6 pytz-deprecation-shim==0.1.0.post0 pywin32-ctypes==0.2.0 PyYAML==6.0 requests==2.27.1 requests-toolbelt==0.9.1 revChatGPT==0.0.33.4 rfc3986==1.5.0 shellingham==1.4.0 six==1.16.0 sniffio==1.3.0 starlette==0.22.0 tenacity==8.1.0 text-unidecode==1.3 tls-client==0.1.5 tomlkit==0.11.6 typing_extensions==4.4.0 tzdata==2022.7 tzlocal==4.2 urllib3==1.26.9 uvicorn==0.20.0 virtualenv==20.14.1 watchfiles==0.18.1 wcwidth==0.2.5 webencodings==0.5.1 websockets==10.4 win32-setctime==1.1.0 yarl==1.8.2 yetanotherpicsearch==1.7.4 zipp==3.8.0

如何复现

发送搜图没有反应 插件已成功加载且消息已转发到插件 image

期望行为

正常运作

实际行为

image 发送搜图没有反应 插件已成功加载且消息已转发到插件

NekoAria commented 1 year ago

日志应该还有一部分吧,光看你贴出来的部分没看出有什么问题。

KiDisplayBlueScreen commented 1 year ago

日志应该还有一部分吧,光看你贴出来的部分没看出有什么问题。

没有了 下面是我强行停止了bot然后重启的 刚刚我又试了试 检查完消息优先级之后就没了 20221212211648

NekoAria commented 1 year ago

私聊也不行吗? 其他 nonebot 插件都正常吗?

KiDisplayBlueScreen commented 1 year ago

私聊也不行吗? 其他 nonebot 插件都正常吗?

不行 我之前装过Chatgpt那个插件 然后装其他插件就没法响应消息了 现在我不加载Chatgpt了也不行 其他的搜图插件也是这样

NekoAria commented 1 year ago

私聊也不行吗? 其他 nonebot 插件都正常吗?

不行 我之前装过Chatgpt那个插件 然后装其他插件就没法响应消息了 现在我不加载Chatgpt了也不行 其他的搜图插件也是这样

那你把重启机器人后打印的日志贴一下。

KiDisplayBlueScreen commented 1 year ago

私聊也不行吗? 其他 nonebot 插件都正常吗?

不行 我之前装过Chatgpt那个插件 然后装其他插件就没法响应消息了 现在我不加载Chatgpt了也不行 其他的搜图插件也是这样

那你把重启机器人后打印的日志贴一下。

C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\requests__init.py:102: RequestsDependencyWarning: urllib3 (1.26.9) or chardet (5.1.0)arset_normalizer (2.0.12) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({})arset_normalizer ({}) doesn't match a supported " 12-13 10:18:28 [SUCCESS] nonebot | NoneBot is initializing... 12-13 10:18:28 [INFO] nonebot | Current Env: dev 12-13 10:18:28 [DEBUG] nonebot | Loaded Config: {'driver': '~fastapi', 'host': IPv4Address('127.0.0.1'), 'port': 8890, 'log_level': 'DEBUG', 'api_timeout': 30.0, 'superusers': set(), 'nickname': set(), 'command_start': {'/'}, 'command_sep': {'.'}, 'session_expire_timeout': datetime.timedelta(seconds=120), 'chatgpt_block': 'True', 'chatgpt_image': 'False', 'chatgpt_account': '', 'chatgpt_to_me': 'True', 'chatgpt_password': '', 'proxy': 'http://127.0.0.1:7890', 'chatgpt_session_token': '', 'chatgpt_cd_time': 30, 'chatgpt_image_width': 500, 'chatgpt_command': '', 'chatgpt_refresh_interval': 15, 'chatgpt_timeout': 30, 'saucenao_api_key': '(我的APIkey)', 'chatgpt_api': 'https://chat.openai.com/', 'chatgpt_priority': 999, 'chatgpt_proxies': 'http://127.0.0.1:7890', 'fastapi_reload': True, 'environment': 'dev'} 12-13 10:18:28 [DEBUG] nonebot | Succeeded to load adapter "OneBot V11" 12-13 10:18:29 [SUCCESS] nonebot | Succeeded to import "echo" 12-13 10:18:29 [SUCCESS] nonebot | Succeeded to import "YetAnotherPicSearch" 12-13 10:18:31 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_gocqhttp" 12-13 10:18:31 [SUCCESS] nonebot | Running NoneBot... 12-13 10:18:31 [DEBUG] nonebot | Loaded adapters: OneBot V11 12-13 10:18:31 [INFO] uvicorn | Will watch for changes in these directories: ['C:\Program Files (x86)\nb\QQbot'] 12-13 10:18:31 [INFO] uvicorn | Uvicorn running on http://127.0.0.1:8890 (Press CTRL+C to quit) 12-13 10:18:31 [INFO] uvicorn | Started reloader process [5056] using WatchFiles 12-13 10:18:32 [SUCCESS] nonebot | NoneBot is initializing... 12-13 10:18:32 [INFO] nonebot | Current Env: dev 12-13 10:18:32 [DEBUG] nonebot | Loaded Config: {'driver': '~fastapi', 'host': IPv4Address('127.0.0.1'), 'port': 8890, 'log_level': 'DEBUG', 'api_timeout': 30.0, 'superusers': set(), 'nickname': set(), 'command_start': {'/'}, 'command_sep': {'.'}, 'session_expire_timeout': datetime.timedelta(seconds=120), 'proxy': 'http://127.0.0.1:7890', 'fastapi_reload': True, 'chatgpt_to_me': 'True', 'chatgpt_image_width': 500, 'chatgpt_password': '', 'chatgpt_refresh_interval': 15, 'chatgpt_cd_time': 30, 'chatgpt_session_token': '', 'environment': 'dev', 'chatgpt_proxies': 'http://127.0.0.1:7890', 'chatgpt_api': 'https://chat.openai.com/', 'chatgpt_timeout': 30, 'chatgpt_account': '', 'chatgpt_priority': 999, 'chatgpt_command': '', 'chatgpt_block': 'True', 'saucenao_api_key': '(这里是APIkey)', 'chatgpt_image': 'False'} 12-13 10:18:32 [DEBUG] nonebot | Succeeded to load adapter "OneBot V11" 12-13 10:18:32 [SUCCESS] nonebot | Succeeded to import "echo" C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\init__.py:102: RequestsDependencyWarning: urllib3 (1.26.9) or chardet (5.1.0)arset_normalizer (2.0.12) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({})arset_normalizer ({}) doesn't match a supported " 12-13 10:18:33 [SUCCESS] nonebot | Succeeded to import "YetAnotherPicSearch" 12-13 10:18:35 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_gocqhttp" 12-13 10:18:35 [INFO] uvicorn | Started server process [3668] 12-13 10:18:35 [INFO] uvicorn | Waiting for application startup. 12-13 10:18:35 [INFO] nonebot_plugin_gocqhttp | [] 当前版本:v1.0.0-rc3 12-13 10:18:35 [INFO] nonebot_plugin_gocqhttp | [] 将使用 device.json 内的设备信息运行Bot. 12-13 10:18:35 [INFO] nonebot_plugin_gocqhttp | [] 开始尝试登录并同步消息... 12-13 10:18:35 [INFO] nonebot_plugin_gocqhttp | [] 使用协议: Android Phone 12-13 10:18:38 [INFO] nonebot_plugin_gocqhttp | Startup complete, Web UI has served to http://127.0.0.1:8890/go-cqhttp/ 12-13 10:18:38 [INFO] uvicorn | Application startup complete. 12-13 10:18:38 [INFO] nonebot_plugin_gocqhttp | [] Protocol -> connect to server: 183.47.117.157:8080 12-13 10:18:38 [WARNING] nonebot_plugin_gocqhttp | [] Protocol -> device lock is disable. http api may fail. 12-13 10:18:40 [INFO] nonebot_plugin_gocqhttp | [] 登录成功 欢迎使用: 12-13 10:18:40 [INFO] nonebot_plugin_gocqhttp | [] 开始加载好友列表... 12-13 10:18:40 [INFO] nonebot_plugin_gocqhttp | [] 共加载 5 个好友. 12-13 10:18:40 [INFO] nonebot_plugin_gocqhttp | [] 开始加载群列表... 12-13 10:18:40 [INFO] nonebot_plugin_gocqhttp | [] 共加载 6 个群. 12-13 10:18:40 [INFO] nonebot_plugin_gocqhttp | go-cqhttp for has successfully started. 12-13 10:18:40 [INFO] nonebot_plugin_gocqhttp | [] 资源初始化完成, 开始处理信息. 12-13 10:18:40 [INFO] nonebot_plugin_gocqhttp | [] アトリは、高性能ですから! 12-13 10:18:40 [INFO] nonebot_plugin_gocqhttp | [] 正在检查更新. 12-13 10:18:40 [INFO] nonebot_plugin_gocqhttp | [] 开始尝试连接到反向WebSocket Universal服务器: ws://127.0.0.1:8890/onebot11 12-13 10:18:40 [INFO] uvicorn | ('127.0.0.1', 50250) - "WebSocket /onebot11" [accepted] 12-13 10:18:40 [INFO] nonebot | OneBot V11 | Bot connected 12-13 10:18:40 [INFO] websockets | connection open 12-13 10:18:40 [INFO] nonebot_plugin_gocqhttp | [] 已连接到反向WebSocket Universal服务器 ws://127.0.0.1:8890/onebot11 12-13 10:18:40 [INFO] nonebot | Event will be handled by Matcher(type='meta_event', module=YetAnotherPicSearch) 12-13 10:18:40 [DEBUG] nonebot | Running Matcher(type='metaevent', module=YetAnotherPicSearch) 12-13 10:18:40 [DEBUG] nonebot | Running handler Dependent(call=) 12-13 10:18:40 [INFO] nonebot | Matcher(type='meta_event', module=YetAnotherPicSearch) running complete 12-13 10:18:40 [INFO] nonebot_plugin_gocqhttp | [] 检查更新完成. 当前已运行最新版本. 12-13 10:18:40 [INFO] nonebot_plugin_gocqhttp | [] 开始诊断网络情况 12-13 10:18:43 [INFO] nonebot_plugin_gocqhttp | [] 网络诊断完成. 未发现问题

NekoAria commented 1 year ago

那个 echo 也没反应吗? 是的话,我只能怀疑是 nonebot_plugin_gocqhttp 的问题了。

KiDisplayBlueScreen commented 1 year ago

那个 echo 也没反应吗? 是的话,我只能怀疑是 nonebot_plugin_gocqhttp 的问题了。 echo有

KiDisplayBlueScreen commented 1 year ago

那个 echo 也没反应吗? 是的话,我只能怀疑是 nonebot_plugin_gocqhttp 的问题了。 找到原因了 我没有在.env.prod里写上触发词 因为刚刚接触这个bot框架不太懂 抱歉了

NekoAria commented 1 year ago

那个 echo 也没反应吗? 是的话,我只能怀疑是 nonebot_plugin_gocqhttp 的问题了。 找到原因了 我没有在.env.prod里写上触发词 因为刚刚接触这个bot框架不太懂 抱歉了

是指这个吗:

COMMAND_START=["/", ""]  # 配置命令起始字符

我也没注意到这个,往文档里写提示好了。

KiDisplayBlueScreen commented 1 year ago

那个 echo 也没反应吗? 是的话,我只能怀疑是 nonebot_plugin_gocqhttp 的问题了。 找到原因了 我没有在.env.prod里写上触发词 因为刚刚接触这个bot框架不太懂 抱歉了

是指这个吗:

COMMAND_START=["/", ""]  # 配置命令起始字符

我也没注意到这个,往文档里写提示好了。