夜火博客

py爬虫 selenium chromedriver 一直报platform_sensor_reader_win.cc(242)] NOT IMPLEMENTED的问题解决

2018-10-22
技术文章
python
爬虫
技术类
selenium
2分钟
201字

写python爬虫的过程中,碰到一个 一直报platform_sensor_reader_win.cc(242)] NOT IMPLEMENTED的问题,虽然程序可以执行,但是一直报,不方便调试等。

命令行报错如下:

main.py

Terminal window
1
[7980:11616:1022/130004.047:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context.
2
3
DevTools listening on ws://127.0.0.1:51683/devtools/browser/6d787d0a-3df9-4b45-8068-997e535709a4
4
5
[1022/130006.109:ERROR:adm_helpers.cc(73)] Failed to query stereo recording.
6
7
[7980:10096:1022/130006.554:ERROR:platform_sensor_reader_win.cc(242)] NOT IMPLEMENTED
8
9
[7980:8444:1022/130006.661:ERROR:platform_sensor_reader_win.cc(242)] NOT IMPLEMENTED
10
11
[7980:11312:1022/130007.228:ERROR:platform_sensor_reader_win.cc(242)] NOT IMPLEMENTED
12
13
[7980:11516:1022/130007.750:ERROR:platform_sensor_reader_win.cc(242)] NOT IMPLEMENTED
14
15
[7980:10448:1022/130008.271:ERROR:platform_sensor_reader_win.cc(242)] NOT IMPLEMENTED
10 collapsed lines
16
17
[7980:4372:1022/130008.791:ERROR:platform_sensor_reader_win.cc(242)] NOT IMPLEMENTED
18
19
[7980:11232:1022/130008.928:ERROR:socket_dispatcher_host.cc(97)] Failed to resolve address for x., errorcode: -105
20
21
[7980:11232:1022/130008.929:ERROR:socket_dispatcher_host.cc(97)] Failed to resolve address for x., errorcode: -105
22
23
[7980:9540:1022/130009.313:ERROR:platform_sensor_reader_win.cc(242)] NOT IMPLEMENTED
24
25
[7980:9884:1022/130009.836:ERROR:platform_sensor_reader_win.cc(242)] NOT IMPLEMENTED

在国内外的网站上根据报错platform_sensor_reader_win.cc(242) 或者 NOT IMPLEMENTED查找解决办法,试了好多方式都不能解决,像给Chromedriver加参数:

1
    options.add_argument('--disable-gpu')
2
3
    options.add_argument('--ignore-certificate-errors')
4
5
    options.add_argument('--ignore-ssl-errors')
6
7
    options.add_experimental_option("excludeSwitches", ["ignore-certificate-errors", "safebrowsing-disable-download-protection", "safebrowsing-disable-auto-update", "disable-client-side-phishing-detection"])
8
9
    options.add_argument('--silent')

以上方式,经尝试,均不行

最终从 DevTools listening on 着手

于 http://www.javaear.com/question/47392423.html 找到限制报错等级的方法:

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

记录一下,方便以后查找

本文标题:py爬虫 selenium chromedriver 一直报platform_sensor_reader_win.cc(242)] NOT IMPLEMENTED的问题解决
文章作者:夜火
发布时间:2018-10-22