UbuntuでSeleniumを使おうとおもったらエラーが出た。
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
ネットの情報をもとに--no-sandboxオプションを付けたりいろいろ試したけれど直らず…
よくよく考えたら--headlessオプションをつけ忘れてた。詳しくいうと、Windowsのデスクトップで動きを見ながら開発していたのをGUI無しのUbuntuに持っていったときに、--headlessオプションを付け直してなかった。
# Python
opt = Options()
opt.add_argument('--headless')
もうちょっと推測しやすいメッセージならいいのに…