Closed ks-EKY closed 1 year ago
这边的建议是把playwright的headless设置成false看看浏览器界面卡在哪里了,感觉像是有初次弹窗卡住了之类的,另外发送按钮的样式也改了, #137 。
按钮问题,同 #137 一样,chatgpt.py>>>155行改成botton = page.locator ('button[class="absolute p-1 rounded-md text-gray-500 bottom-1.5 md:bottom-2.5 hover:bg-gray-100 enabled:dark:hover:text-gray-400 dark:hover:bg-gray-900 disabled:hover:bg-transparent dark:disabled:hover:bg-transparent right-1 md:right-2 disabled:opacity-40"]') 即可
报告清单
影响版本
nb商店的版本
问题描述
也开了系统代理,配置了env的token和FASTAPI_RELOAD = false,有时候运行说 #119 类似这个,有时候又会显示下面我发的日志,bot回复的是chatgpt目前无法回复您的问题。可能的原因是同时提问过多,问题过于复杂等。或者ChatGPT回复已超时。
复现步骤
每次都有
预期行为
正常运行
实际行为
日志报错
日志信息
03-26 06:38:49 [SUCCESS] nonebot | OneBot V11 1017549025 | [message.group.normal]: Message -1147473740 from 3184165835@[群:983738958] '[at:qq=1017549025] 修不好' 03-26 06:38:49 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_repeater) 03-26 06:38:49 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_repeater) running complete 03-26 06:38:49 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_chatgpt.utils) 03-26 06:39:13 [ERROR] nonebot_plugin_chatgpt | ChatGPT request failed: Error: Execution context was destroyed, most likely because of a navigation =========================== logs =========================== checking visibility of locator("text=OpenAI Discord")
Traceback (most recent call last): File "E:\nonebot2\nonebot2-oneclick-win\bot.py", line 98, in
nonebot.run()
File "E:\nonebot2\nonebot2-oneclick-win\venv\virtualenvs\nb2-oneclick-CTxwZjGP-py3.10\lib\site-packages\nonebot__init__.py", line 273, in run
get_driver().run(*args, *kwargs)
File "E:\nonebot2\nonebot2-oneclick-win\venv\virtualenvs\nb2-oneclick-CTxwZjGP-py3.10\lib\site-packages\nonebot\drivers\fastapi.py", line 187, in run
uvicorn.run(
File "E:\nonebot2\nonebot2-oneclick-win\venv\virtualenvs\nb2-oneclick-CTxwZjGP-py3.10\lib\site-packages\uvicorn\main.py", line 569, in run
server.run()
File "E:\nonebot2\nonebot2-oneclick-win\venv\virtualenvs\nb2-oneclick-CTxwZjGP-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 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 1899, 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 "E:\nonebot2\nonebot2-oneclick-win\venv\virtualenvs\nb2-oneclick-CTxwZjGP-py3.10\lib\site-packages\nonebot\message.py", line 141, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
File "E:\nonebot2\nonebot2-oneclick-win\venv\virtualenvs\nb2-oneclick-CTxwZjGP-py3.10\lib\site-packages\nonebot\message.py", line 187, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "E:\nonebot2\nonebot2-oneclick-win\venv\virtualenvs\nb2-oneclick-CTxwZjGP-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 "E:\nonebot2\nonebot2-oneclick-win\venv\virtualenvs\nb2-oneclick-CTxwZjGP-py3.10\lib\site-packages\nonebot\internal\matcher\matcher.py", line 707, in simple_run
await handler(
File "E:\nonebot2\nonebot2-oneclick-win\venv\virtualenvs\nb2-oneclick-CTxwZjGP-py3.10\lib\site-packages\nonebot\dependencies__init.py", line 108, in call__
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
额外补充
无