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

原书第16页pyteer.py执行报错 #4

Open
cailuo opened this issue Mar 10, 2020 · 0 comments
Open

原书第16页pyteer.py执行报错 #4

cailuo opened this issue Mar 10, 2020 · 0 comments

Comments

@cailuo
Copy link

cailuo commented Mar 10, 2020

原书第16页代码执行时报以下错误:
pyppeteer.errors.BrowserError: Browser closed unexpectedly:
[0310/181827.222752:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
系统:Ubuntu 18.04.4 LTS

解决办法:修改相应代码
browser = await launch()
修改为
browser = await launch({'args': ['--no-sandbox']})

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

1 participant