nobodykonws的个人博客分享 http://blog.sciencenet.cn/u/nobodykonws

博文

坑爹的Windows 10更新

已有 5434 次阅读 2017-12-21 18:07 |系统分类:生活其它

今天在跑一个之前写的Python程序时报错:

F:\workplace\5iDHL>getwaybills.py

[13044:10988:1221/171916.634:ERROR:policy_loader_win.cc(505)] PReg file doesn't exist: C:\WINDOWS\System32\GroupPolicy\User\Registry.pol

DevTools listening on ws://127.0.0.1:12084/devtools/browser/3553e8bc-6f51-465a-9bf5-1c7ae3048a2f

Traceback (most recent call last):

 File "F:\workplace\5iDHL\getWaybills.py", line 12, in <module>

   driver.get(loginUrl);

 File "C:\Users\sunnybirds\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 323, in get

   self.execute(Command.GET, {'url': url})

 File "C:\Users\sunnybirds\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 311, in execute

   self.error_handler.check_response(response)

 File "C:\Users\sunnybirds\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 237, in check_response

   raise exception_class(message, screen, stacktrace)

selenium.common.exceptions.WebDriverException: Message: unknown error: missing or invalid 'entry.level'

 (Session info: chrome=63.0.3239.84)

 (Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Windows NT 10.0.16299 x86_64)


错误说C:\WINDOWS\System32\GroupPolicy\User\Registry.pol的这个文件不存在了,难道是模块损坏了?于是卸载重装selenium模块,没有解决问题。


看来这锅得摔给windows 10了,既然模块没有问题,那就是系统的问题了(不然怎么会爆出系统盘的系统文件少了,肯定是系统更新的时候删了)。

于是把C:\Windows\System32\GroupPolicy\Machine下的Registry.pol复制到C:\WINDOWS\System32\GroupPolicy\User\,问题解决。

然而还是不能运行,出了一个新问题:

F:\workplace\5iDHL>getwaybills.py

DevTools listening on ws://127.0.0.1:12075/devtools/browser/53a8dc11-90b6-47e1-be1f-9e96ee0fc7f6

Traceback (most recent call last):

 File "F:\workplace\5iDHL\getWaybills.py", line 12, in <module>

   driver.get(loginUrl);

 File "C:\Users\sunnybirds\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 323, in get

   self.execute(Command.GET, {'url': url})

 File "C:\Users\sunnybirds\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 311, in execute

   self.error_handler.check_response(response)

 File "C:\Users\sunnybirds\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 237, in check_response

   raise exception_class(message, screen, stacktrace)

selenium.common.exceptions.WebDriverException: Message: unknown error: missing or invalid 'entry.level'

 (Session info: chrome=63.0.3239.84)

 (Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Windows NT 10.0.16299 x86_64)

问题出在chrome与chromedriver版本号不匹配,将chromedriver升级即可解决问题



https://blog.sciencenet.cn/blog-3196388-1090837.html

上一篇:AutoDock实例教程
下一篇:Python将ts格式视频转换成mp4
收藏 IP: 27.115.44.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-3-29 07:51

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部