Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

启动时卡死 #17

Closed
dbxxx-ac opened this issue May 1, 2022 · 11 comments
Closed

启动时卡死 #17

dbxxx-ac opened this issue May 1, 2022 · 11 comments

Comments

@dbxxx-ac
Copy link
Contributor

dbxxx-ac commented May 1, 2022

在 get_browser 函数这里卡死。

进行了一下深入的定位,browser.py 中的 _playwright = await async_playwright().start() 这句开始卡死

进一步跟进到了playwright库,_context_manager.py的start()函数,在

        done, pending = await asyncio.wait(
            {self._connection._transport.on_error_future, playwright_future},
            return_when=asyncio.FIRST_COMPLETED,
        )

这里卡死。

之前使用一直正常,后来重装系统,进行初始安装后,前两次运行正常,后来就开始卡死。没有任何输出,nonebot也无法启动。

@kexue-z
Copy link
Owner

kexue-z commented May 1, 2022

网络不好 自动安装playwright的时候卡死

可以尝试在同一环境下手动 playwright install

@dbxxx-ac
Copy link
Contributor Author

dbxxx-ac commented May 1, 2022

初始安装指的是第一次运行bot,会安装一个东西。可能是install_browser()这个函数?

我对playwright库丝毫不了解,望大佬轻喷

@dbxxx-ac
Copy link
Contributor Author

dbxxx-ac commented May 1, 2022

网络不好 自动安装playwright的时候卡死

可以尝试在同一环境下手动 playwright install

好的,正在尝试

@dbxxx-ac
Copy link
Contributor Author

dbxxx-ac commented May 1, 2022

网络不好 自动安装playwright的时候卡死

可以尝试在同一环境下手动 playwright install

仍然卡死

@dbxxx-ac
Copy link
Contributor Author

dbxxx-ac commented May 1, 2022

网络不好 自动安装playwright的时候卡死

可以尝试在同一环境下手动 playwright install

好像不是安装playwright出现的问题吧,之前已经安装成功了,卡死点不是安装函数那里

@dbxxx-ac
Copy link
Contributor Author

dbxxx-ac commented May 1, 2022

(venv) PS D:\programming\Projects\Ahabot> playwright install
Active code page: 936
Downloading Playwright build of firefox v1322 - 75.7 Mb [====================] 100% 0.0s
Playwright build of firefox v1322 downloaded to C:\Users\dbxxxqwq\AppData\Local\ms-playwright\firefox-1322
Downloading Playwright build of webkit v1630 - 56.5 Mb [====================] 100% 0.0s
Playwright build of webkit v1630 downloaded to C:\Users\dbxxxqwq\AppData\Local\ms-playwright\webkit-1630

(venv) PS D:\programming\Projects\Ahabot> nb run
05-01 12:39:54 [SUCCESS] nonebot | NoneBot is initializing...
05-01 12:39:54 [INFO] nonebot | Current Env: dev
05-01 12:39:54 [DEBUG] nonebot | Loaded Config: {'driver': '~fastapi', 'host': IPv4Address('127.0.0.1'), 'port': 8080, 'log_level': 'DEBUG', 'api_t
imeout': 30.0, 'superusers': {'3364835621'}, 'nickname': {'啊哈', 'ahabot', 'Aha', 'aha', 'Ahabot'}, 'command_start': {'', '/'}, 'command_sep': {'.
'}, 'session_expire_timeout': datetime.timedelta(seconds=180), 'datastore_config_dir': './data/config', 'datastore_cache_dir': './data/cache', 'dat
astore_data_dir': './data/data', 'environment': 'dev', 'fastapi_reload': False, 'gocq_accounts': [{'uin': '3466211762', 'password': 'zql740125', 'p
rotocol': 1}], 'custom_config': 'common config'}
05-01 12:39:54 [DEBUG] nonebot | Succeeded to load adapter "OneBot V11"
05-01 12:39:55 [SUCCESS] nonebot | Succeeded to import "nonebot.plugins.echo"
05-01 12:39:55 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_htmlrender"
05-01 12:39:55 [SUCCESS] nonebot | Running NoneBot...
05-01 12:39:55 [DEBUG] nonebot | Loaded adapters: OneBot V11
05-01 12:39:55 [INFO] uvicorn | Started server process [6048]
05-01 12:39:55 [INFO] uvicorn | Waiting for application startup.

然后就会卡死在这里,Ctrl+C无反应,卡死点已经在描述中给出

@dbxxx-ac dbxxx-ac mentioned this issue May 1, 2022
@kexue-z
Copy link
Owner

kexue-z commented May 1, 2022

哦 Windows尝试更换驱动器

#15

@dbxxx-ac
Copy link
Contributor Author

dbxxx-ac commented May 1, 2022

哦 Windows尝试更换驱动器

#15

尝试后问题依旧

@dbxxx-ac
Copy link
Contributor Author

dbxxx-ac commented May 1, 2022

哦 Windows尝试更换驱动器

#15

我换的是quart驱动器,还是会在一样的点卡死

@kexue-z
Copy link
Owner

kexue-z commented May 1, 2022

那我就,,,不懂了 建议使用wsl或者问问之前那位怎么解决的

@dbxxx-ac
Copy link
Contributor Author

dbxxx-ac commented May 2, 2022

那我就,,,不懂了 建议使用wsl或者问问之前那位怎么解决的

用wsl解决问题了,果然小心windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants