A-kirami / nonebot-plugin-chatgpt

MIT License
319 stars 37 forks source link

[BUG]: AttributeError: 'Page' object has no attribute 'get_by_role' #97

Closed PrayerT closed 1 year ago

PrayerT commented 1 year ago

报告清单

影响版本

CommitId:36716af

问题描述

image

貌似是卡在了人机测试上

复现步骤

安装最新的版本,运行即得

预期行为

正常运行

实际行为

报错AttributeError: 'Page' object has no attribute 'get_by_role'

日志信息

No response

额外补充

No response

wryte123 commented 1 year ago

相同问题 image

LittleMio commented 1 year ago

像这种情况只需要升级playwright即可 如果接下来报错AttributeError: 'NoneType' object has no attribute 'new_page' 可参考https://github.com/A-kirami/nonebot-plugin-chatgpt/issues/80#issuecomment-1360917617

PrayerT commented 1 year ago

像这种情况只需要升级playwright即可 如果接下来报错AttributeError: 'NoneType' object has no attribute 'new_page' 可参考#80 (comment)

使用poetry run pip install playwright --upgrade之后playwright --version显示是1.29.0,在poetry shell中启动bot问题仍然存在 按照#80的做法进行playwright install-deps,playwright install-deps chromium firefox以后问题仍然存在 是需要重启shell或者整个环境?

LittleMio commented 1 year ago

像这种情况只需要升级playwright即可 如果接下来报错AttributeError: 'NoneType' object has no attribute 'new_page' 可参考#80 (comment)

使用poetry run pip install playwright --upgrade之后playwright --version显示是1.29.0,在poetry shell中启动bot问题仍然存在 按照#80的做法进行playwright install-deps,playwright install-deps chromium firefox以后问题仍然存在 是需要重启shell或者整个环境?

可以试试先把playwright完全卸载(包括删除playwright下载的文件存放路径里的所有文件),再安装并重新运行上面命令

PrayerT commented 1 year ago

重新安装环境之后,问题未复现,转为#102