. Advertisement .
..3..
. Advertisement .
..4..
Many programmers choose the Python programming language. This tool has been considered one of the easiest programming languages to learn. Therefore, Python has become the perfect choice for programmers from beginner to advanced levels. While performing your task, you receive the: ERROR:gpu_init.cc(426) Passthrough is not supported, GL is disabled in Python. This error was very common that any coder could face. So, when does it happen, and is it fixable? Let us collaborate to identify the most effective technique.
Why Did The: ERROR:gpu_init.cc(426) Passthrough is not supported, GL is disabled in Python happen?
You are attempting to crawl a website with Selenium and webdriver manager.chrome. However, the following error message appears after crawling.
ERROR:gpu_init.cc(426) Passthrough is not supported, GL is disabled
The Best Solution For: ERROR:gpu_init.cc(426) Passthrough is not supported, GL is disabled in Python
Solution 1:
Surprisingly, you repaired it by employing the following solution.
You need to enable WebGL in Chrome to resolve this error in the above case.
1. First and foremost, we will enable hardware acceleration.
2. Navigate to chrome:/settings.
3. Then, at the bottom of the page, click the Advanced button.
4. There is a System section; check the Use hardware acceleration when available checkbox (any changes will take effect after you relaunch Chrome).
5. We will now enable WebGL.
6. Navigate to chrome:/flags.
7. Check that Disable WebGL is not enabled (any changes will take effect after you relaunch Chrome).
8. The Disable WebGL option will no longer be available; instead, look for WebGL 2.0.
9. In this case, change Default to Enabled in the drop-down menu.
We will now check the status of WebGL.
1. Navigate to chrome:/gpu.
2. Examine the WebGL item in the list of Graphics Feature Status. One of the following will be the status:
1. Hardware acceleration — WebGL is activated and hardware-accelerated (running on the graphics card).
2. WebGL is enabled, but only in software, with no hardware acceleration — WebGL is enabled, but only in software. More information can be found here: “SwiftShader, a software GL rasterizer, is used by Chrome for software rendering of WebGL.”
3. WebGL is not available in either hardware or software.
Solution 2:
Excepting the above solution, there is another solution for solving the error ”ERROR:gpu_init.cc(426) Passthrough is not supported, GL is disabled in Python”. It is disabling the view of NVIDIA’s Quadro. Although this is a simple method, it’s very effective. After doing that, your error will be removed.
Solution 3:
To use the chromedriver in headless mode on Windows, you must use the --headless
and --disable-gpu
options [2]. Due to a trouble, it appears that Linux also needs --disable-gpu
[3].
If you remove the --headless
and --disable-gpu
options, the error message won’t show up but the Chromedriver no longer works in headless mode. However, there are some cases the warning message doesn’t influence the work of a headless chrome as my case. I discover, “Without a GPU, Chrome can still work back. However, Telemetry needs a GPU to get consistent results [4].”
In order to disable WebGL, I also utilized the --disable-software-rasterizer
choice [5]. The error message is no longer shown in the headless operation.
Conclusion
If you’re confused by the: ERROR:gpu_init.cc(426) Passthrough is not supported, GL is disabled in Python, and the above solution is the most effective. Even if you still need help or have core Python questions, there is a large community to which you can turn, and everyone is usually eager to help. Finally, we wish all of our readers a wonderful day full of new ideas.
Leave a comment