We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我将程序部署在服务器后,发现运行make_snapshot提示:DevToolsActivePort file doesn't exist。 通过分析发现,在docker容器root权限下,chrome无法运行,需要在使用selenium调用chromedriver时为其添加参数”—no-sandbox”。 建议在get_chrome_driver函数在添加“—headless”参数的同时,加上上述参数。或者,为get_chrome_driver函数添加关键字参数,让使用者可以自行添加参数。
The text was updated successfully, but these errors were encountered:
在snapshot.py里面设置吗?为什么我设置了还是不行……
Sorry, something went wrong.
解决了,本地的没有同步到服务器,也是醉了。 def get_chrome_driver(): options = webdriver.ChromeOptions() options.add_argument("headless") options.add_argument('no-sandbox') return webdriver.Chrome(options=options) 改为这样即可
对,没有 X window sever 的话, headless 是必须的
No branches or pull requests
我将程序部署在服务器后,发现运行make_snapshot提示:DevToolsActivePort file doesn't exist。
通过分析发现,在docker容器root权限下,chrome无法运行,需要在使用selenium调用chromedriver时为其添加参数”—no-sandbox”。
建议在get_chrome_driver函数在添加“—headless”参数的同时,加上上述参数。或者,为get_chrome_driver函数添加关键字参数,让使用者可以自行添加参数。
The text was updated successfully, but these errors were encountered: