Closed RokasUrbelis closed 1 year ago
那肯定是不填不行
修改了一个无代理的版本 https://github.com/cpuopt/nonebot_plugin_imgexploration/tree/no-proxies/nonebot_plugin_imgexploration 替换这两个py文件就可以了
替换两个文件后,代理问题解决了,这个报错仍然还在:
02-13 03:03:51 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_imgexploration) failed.
Traceback (most recent call last):
File "
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 48, in get_pic await search.doSearch() File "/opt/first/.venv/lib/python3.10/site-packages/nonebot_plugin_imgexploration/imgexploration.py", line 409, 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 353, in __ascii2d_build_result logger.success(f"ascii2d result:{len(result_li)}") UnboundLocalError: local variable 'result_li' referenced before assignment
而且每次都出现几个ERROR:
Drawing 搜出来的东西差距太大
ERROR和那个报错是网络问题,梯子共用的人太多,撞了网站的速率限制 比如我这个梯子是没问题的 saucenao和ascii2d是用来搜动漫插画的,识别不了其他图片
刚刚更新了0.2.4 解决了result_li未定义问题 (logger的error是网络问题,只能换节点或换梯子解决) 不使用代理,不写配置项proxy_port或留空就可以,用pip更新或nb plugin重装插件就行
✅已解决。
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)
第二个问题,proxy变量应该不是必填项吧,我本地走openwrt,不需要在系统上单独设置proxy