2
votes

I am using a script daily. It's a headless chrome that just checks a site every 5 minutes and suddenly devmode turned on and i can't seem to turn it off. This is my script:

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('headless')
driver = webdriver.Chrome + 'E:\Chrome Downloads\chromedriver_win32\chromedriver.exe', chrome_options=options)

And the output is:

[0926/111600.894:ERROR:devtools_http_handler.cc(786)]
DevTools listening on 127.0.0.1:12107

[0926/111601.685:ERROR:browser_gpu_channel_host_factory.cc(103)] Failed to launch GPU process.

It also spews out the F12 developer console info everytime it connects to a new site. :c

2
I would like to clear up a few things. My script was working fine for around 3 weeks straight without anything modified and now all my selenium scripts are "infected" with this problem. The console for my other script is basically unreadable because it visits 50 pages per minute. - Walter
The exact same thing started happening to me sometime in the last week. Did you happen to figure out why this started happening? Your fix worked for me! - BWarner

2 Answers

4
votes

I managed to fix it finally :D

options.add_argument('--log-level=3')

That was all it took.

3
votes

I was running into the same issue and adding the log-level argument only did not work for me.

On Windows you obviously need to add the following option to your ChromeOptions as well:

options.add_experimental_option('excludeSwitches', ['enable-logging'])

As described here: https://bugs.chromium.org/p/chromedriver/issues/detail?id=2907#c3