我有一个python脚本,它使用下一行selenium调用chrome。
ff = webdriver.Chrome('/home/user01/webScraping/CollectAndGo/chromedriver')
python脚本是从shell脚本调用的。
python /home/user01/webScraping/CollectAndGo/cgcom.py > /home/user01/webScraping/CollectAndGo/cgcom.log 2>&1
当我从终端运行脚本或只执行.sh文件时,它工作得很完美,但是当我安排一个crontab作业时,它会失败,下一个错误就会失败。
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: u'unknown error: Chrome failed to start: exited abnormally\n (Driver info: chromedriver=2.9.248304,platform=Linux 3.5.0-36-generic x86_64)'
此错误与此问题的第一行代码有关。有人知道为什么会发生这种事吗?
https://stackoverflow.com/questions/23908319
复制相似问题